/* 颜色、字重、圆角和按钮来自 guide.html 加载的 AgentKit 源力主题。 */
:root {
  color-scheme: light;
  --guide-space-xs: 8px;
  --guide-space-sm: 12px;
  --guide-space-md: 16px;
  --guide-space-lg: 24px;
  --guide-space-xl: 32px;
  --guide-section-gap: 48px;
  --guide-drawer-width: 320px;
}
* { box-sizing: border-box; }
html.guide-shell { min-width: 0; overflow: hidden; }
html.guide-shell body { --guide-content-offset: 0px; min-width: 0; margin: 0; height: 100dvh; overflow: hidden; display: flex; flex-direction: column; color: var(--color-text-1); background: var(--color-bg-1); font-size: 12px; line-height: 18px; }
html.guide-shell.notes-open body { --guide-content-offset: min(var(--guide-drawer-width), calc(100vw - 24px)); }
[hidden] { display: none !important; }
.svg-defs { position: absolute; width: 0; height: 0; }
:where(.guide-header, .guide-notes, #welcome) svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:is(.guide-header, .guide-notes, #welcome) button { font-family: inherit; cursor: pointer; }
:is(.guide-header, .guide-notes, #welcome) button:disabled { cursor: not-allowed; }
:is(.guide-header, .guide-notes, #welcome) :is(button,a):focus-visible { outline: 2px solid rgb(var(--primary-6)); outline-offset: 3px; }
.guide-header { position: relative; z-index: 3000; flex: none; display: flex; align-items: center; gap: var(--guide-space-xl); min-height: 64px; padding: var(--guide-space-sm) var(--guide-space-lg); background: var(--color-bg-1); border-bottom: 1px solid var(--color-border-2); }
.brand { display: flex; align-items: center; gap: var(--guide-space-sm); font-size: 16px; line-height: 24px; font-weight: var(--font-weight-600); white-space: nowrap; }
.brand-icon { display: grid; place-items: center; width: 24px; height: 24px; color: rgb(var(--primary-6)); }
.guide-header svg.product-icon { width: 20px; height: 20px; fill: currentColor; stroke: none; }
.header-actions { display: flex; gap: var(--guide-space-sm); margin-left: auto; }
.step-controls { display: flex; gap: var(--guide-space-sm); }
.guide-header .arco-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--guide-space-xs); transition-property: color, background-color, border-color, box-shadow; }
.guide-header .arco-btn > svg { margin: 0; }
.guide-header .arco-btn > span { margin: 0; }
.guide-header .arco-btn-outline { background: var(--color-bg-1); }
.guide-shell .arco-btn-primary:not(.arco-btn-disabled):hover { background-color: rgb(var(--primary-7)); border-color: transparent; }
#previous { min-width: 100px; }
#next { min-width: 88px; }
#toggle-notes { min-width: 112px; }
#toggle-notes svg { color: rgb(var(--primary-6)); }
#toggle-notes[aria-expanded="true"] { color: rgb(var(--primary-6)); border-color: rgb(var(--primary-6)); background: var(--color-primary-light-1); }
.chapter-picker { position: relative; width: 320px; min-width: 160px; min-height: 36px; }
#chapter-toggle { width: 100%; justify-content: space-between; }
.chapter-path { display: flex; align-items: center; gap: 8px; min-width: 0; white-space: nowrap; }
#chapter-name { flex: none; color: var(--color-text-2); }
#section-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#chapter-toggle svg { color: rgb(var(--primary-6)); }
.guide-menu-popup { z-index: 3100 !important; }
/* 产品提示可越过导览栏，首次导览遮罩仍保持在其上方。 */
.guide-shell :is(.arco-popover, .arco-tooltip) { z-index: 3200; }
/* 全局消息需高于导览、目录和首次进入的聚光灯。 */
.guide-shell .arco-message-wrapper, .guide-shell .arco-notification-wrapper { z-index: 4000; }
.guide-chapter-menu { max-width: calc(100vw - 32px); }
/* 目录选中态贯穿整行；保留 Menu 的文字内边距和键盘行为。 */
.guide-chapter-menu .arco-dropdown-menu-inner { padding-inline: 0; }
#chapter-menu .arco-dropdown-menu-selected::before { left: 0; right: 0; border-radius: var(--border-radius-none); background: var(--color-primary-light-2); }
.chapter-heading { font-weight: var(--font-weight-500); }
.guide-workspace { position: relative; flex: 1; min-height: 0; overflow: hidden; }
.product-view { position: absolute; inset: 0; right: var(--guide-content-offset); transition: right 320ms cubic-bezier(.2,.8,.2,1); }
#product-view > #root { width: 100%; height: 100%; overflow: auto; }
/* 仅首屏隐藏异步填充；后续切换保留页面和导航。 */
#product-view[data-initializing] > #root,
#product-view[data-initializing] > #root * { visibility: hidden !important; }
#product-view[data-initializing] .c-m-sidebar,
#product-view[data-initializing] .c-m-sidebar * { transition: none !important; }
.guide-shell body { --ve-navbar-height: var(--guide-header-height, 64px); }
.guide-shell .arco-drawer-wrapper, .guide-shell .arco-modal-wrapper, .guide-shell .arco-modal-mask { top: var(--guide-header-height, 64px); left: 0; width: calc(100% - var(--guide-content-offset)); height: calc(100dvh - var(--guide-header-height, 64px)); transition: width 320ms cubic-bezier(.2,.8,.2,1); }
.guide-shell .arco-drawer { max-width: 100%; }
#loading { position: absolute; inset: 0; display: flex; gap: var(--guide-space-md); flex-direction: column; align-items: center; justify-content: center; background: var(--color-bg-4); color: var(--color-text-2); z-index: 2200; }
.guide-notes { font-family: "MiSans", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif; font-synthesis: none; position: absolute; z-index: 2500; right: 0; top: 0; bottom: 0; width: var(--guide-drawer-width); max-width: calc(100% - 24px); display: flex; flex-direction: column; background: var(--color-bg-1); border-left: 1px solid var(--color-border-2); transition: transform 320ms cubic-bezier(.2,.8,.2,1), opacity 320ms, visibility 320ms; }
.guide-shell:not(.notes-open) .guide-notes { transform: translateX(100%); opacity: 0; visibility: hidden; pointer-events: none; }
/* 标题和正文就绪后同时展示，避免空标题补入时移动关闭按钮。 */
.guide-notes[data-initializing] > * { visibility: hidden; }
.notes-heading { display: flex; align-items: center; justify-content: space-between; gap: var(--guide-space-md); padding: var(--guide-space-lg) var(--guide-space-lg) var(--guide-space-md); }
.notes-heading h1 { margin: 0; color: var(--color-text-1); font-size: 16px; line-height: 24px; font-weight: var(--font-weight-500); text-wrap: pretty; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; flex: none; border: 0; border-radius: var(--border-radius-small); background: transparent; width: 32px; height: 32px; padding: 0; color: var(--color-text-2); }
.icon-button:hover { background: var(--color-bg-4); }
.icon-button svg { width: 20px; height: 20px; }
.notes-content { flex: 1; min-height: 0; overflow: auto; padding: 0 var(--guide-space-lg) var(--guide-section-gap); }
.notes-section { overflow-wrap: anywhere; }
.notes-section p, .notes-section ul { font-size: 14px; line-height: 24px; font-weight: var(--font-weight-400); color: var(--color-text-2); margin: var(--guide-space-sm) 0 0; text-wrap: pretty; }
.notes-section ul { padding-left: 20px; }
.notes-section li + li { margin-top: var(--guide-space-xs); }
.notes-section > :first-child { margin-top: 0; }
.notes-section strong { color: var(--color-text-1); font-weight: var(--font-weight-500); }
.notes-section code { color: var(--color-text-1); font: inherit; }
.chapter-progress { position: absolute; bottom: -1px; left: 0; right: 0; display: flex; gap: 4px; pointer-events: none; }
.chapter-progress > span { flex: 1; height: 2px; background: var(--color-border-2); overflow: hidden; }
.chapter-progress i { display: block; height: 100%; width: 0; background: rgb(var(--primary-6)); transition: width 240ms ease; }
#focus-layer { position: absolute; inset: 0; z-index: 2400; pointer-events: none; }
/* 点击区不绘制遮罩；统一由圆角框的扩展阴影遮挡外围，避免四角接缝。 */
.shade { position: absolute; pointer-events: auto; }
#focus-ring { position: absolute; border: 2px solid rgb(var(--primary-6)); border-radius: var(--border-radius-small); box-shadow: 0 0 0 100vmax var(--color-mask-bg); pointer-events: none; }
#welcome-mask { position: fixed; z-index: 3500; inset: 64px 0 0; background: var(--color-mask-bg); }
#welcome { position: fixed; z-index: 3700; top: 80px; left: 24px; width: 320px; max-width: calc(100vw - 32px); padding: var(--guide-space-lg); border-radius: var(--border-radius-small); background: var(--color-bg-1); box-shadow: 0 4px 12px color-mix(in srgb, var(--color-black) 16%, transparent); }
#welcome::before { content: ''; position: absolute; top: -6px; left: var(--welcome-arrow-left, 36px); width: 12px; height: 12px; transform: rotate(45deg); background: var(--color-bg-1); }
#welcome h2 { font-size: 16px; line-height: 24px; font-weight: var(--font-weight-600); margin: 0 0 var(--guide-space-xs); }
#welcome p { color: var(--color-text-2); font-size: 14px; line-height: 22px; margin: 0 0 var(--guide-space-md); }
.welcome-footer { display: flex; align-items: center; justify-content: space-between; gap: var(--guide-space-md); }
#welcome-count { color: var(--color-text-2); }
#welcome kbd { display: inline-block; min-width: 20px; padding-inline: 4px; border: 1px solid var(--color-border-2); border-radius: var(--border-radius-small); background: var(--color-bg-1); box-shadow: none; font: inherit; text-align: center; color: var(--color-text-2); }
#close-welcome { position: absolute; top: var(--guide-space-sm); right: var(--guide-space-sm); }
body.welcoming .guide-header { z-index: 3600; }
.notice { position: absolute; z-index: 3700; top: var(--guide-space-md); left: 50%; transform: translateX(-50%); max-width: calc(100% - 32px); padding: var(--guide-space-xs) var(--guide-space-md); background: var(--color-bg-1); border: 1px solid var(--color-border-2); border-radius: var(--border-radius-small); box-shadow: 0 4px 16px color-mix(in srgb, var(--color-black) 8%, transparent); }
@media (max-width: 1200px) {
  .guide-header { flex-wrap: wrap; gap: var(--guide-space-sm); padding: var(--guide-space-sm) var(--guide-space-md); }
  .brand { font-size: 14px; }
  .chapter-picker { margin-left: auto; flex: 1; min-width: 0; max-width: 320px; }
  #chapter-toggle { min-width: 0; }
  .guide-chapter-menu { max-height: calc(100dvh - 144px) !important; }
  .header-actions { width: 100%; justify-content: flex-end; gap: var(--guide-space-xs); }
  .step-controls { gap: var(--guide-space-xs); }
  .step-controls button > svg, #presentation-link > span { display: none; }
  .guide-header #presentation-link { width: 36px; padding: 0; flex: none; }
  .guide-header .arco-btn { padding-inline: var(--guide-space-sm); }
  #previous, #next, #toggle-notes { min-width: 0; }
  .guide-notes { width: var(--guide-drawer-width); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }

/* 纯净展示只隐藏当前导览，不重载产品，也不保存到下一次刷新。 */
.presentation-mode :is(#guide-header, #guide-notes, #focus-layer, #welcome, #welcome-mask, #notice) { display: none !important; }
.presentation-mode #product-view { outline: none; }

#mobile-handoff { width: min(400px, calc(100vw - 48px)); max-height: calc(100dvh - 48px); padding: 24px; border: 0; border-radius: var(--border-radius-small); background: var(--color-bg-1); color: var(--color-text-1); box-shadow: 0 8px 24px rgb(0 0 0 / 16%); }
#mobile-handoff::backdrop { background: var(--color-mask-bg); }
#mobile-handoff h2 { margin: 0 0 12px; font-size: 18px; line-height: 26px; }
#mobile-handoff p { margin: 0 0 20px; color: var(--color-text-2); font-size: 14px; line-height: 24px; }
.mobile-copy-fallback { position: fixed; width: 1px; height: 1px; padding: 0; border: 0; opacity: 0; pointer-events: none; font-size: 16px; }
#copy-mobile-url { width: 100%; }
#mobile-copy-status { display: block; min-height: 20px; margin-top: 8px; color: var(--color-text-2); line-height: 20px; }
#mobile-copy-status:empty { display: none; }
