/* mindmap5.3 · css/demo-showcase.css —— 左侧演示入口及介绍窗口 */
.demo-launch-group {
  position: fixed; left: max(10px, env(safe-area-inset-left));
  top: calc(var(--menubar-h) + 12px); z-index: calc(var(--z-manager) + 1);
  display: flex; gap: 4px; align-items: center;
}
.demo-launch-group[hidden], .demo-dialog [hidden] { display: none !important; }
.demo-launch {
  min-height: 44px; padding: 8px 12px; border-radius: var(--radius-btn);
  border: 2px solid var(--ui-accent); background: var(--ui-accent-soft);
  color: var(--ui-accent); font: inherit; font-weight: 750; cursor: pointer;
  box-shadow: var(--ui-shadow);
}
.demo-launch-dismiss { min-height: 44px; padding: 8px; border: 1px solid var(--ui-border); border-radius: var(--radius-btn); background: var(--ui-panel); color: var(--ui-muted); cursor: pointer; }
.demo-fallback { display: grid; gap: 8px; }
.demo-fallback button, .demo-fallback a { padding: 12px; border: 1px solid var(--ui-border); border-radius: var(--radius-btn); background: var(--ui-bg); color: var(--ui-accent); font: inherit; text-align: start; cursor: pointer; }
.demo-error-details { margin: 12px 0; color: var(--ui-muted); font-size: 12px; }
.demo-error-details pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.demo-launch:focus-visible, .demo-dialog button:focus-visible, .demo-dialog a:focus-visible { outline: 3px solid var(--ui-accent); outline-offset: 3px; }
.demo-dialog { width: min(var(--demo-dialog-width), calc(100vw - 48px)); max-height: calc(100dvh - 64px); overflow: auto;
  box-sizing: border-box; padding: 24px; border: 1px solid var(--ui-border);
  border-radius: var(--radius-btn); background: var(--ui-panel); color: var(--ui-text); box-shadow: var(--ui-shadow); }
.demo-dialog::backdrop { background: var(--ui-overlay, #0008); }
.demo-dialog h2 { margin: 0 0 24px; font-size: var(--ui-font-heading); color: var(--ui-muted); }
.demo-dialog h2:focus { outline: none; }
.demo-dialog p { line-height: 1.6; }
.demo-purpose { margin: 0 0 24px; padding: 20px; border-inline-start: 3px solid var(--ui-accent); border-radius: var(--radius-btn); background: var(--ui-accent-soft); }
.demo-problems { margin: 0 0 20px; }
.demo-problems h3 { margin: 0 0 12px; color: var(--ui-muted); font-size: var(--ui-font-control); font-weight: var(--ui-weight-medium); }
.demo-problem-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.demo-problem-list li { padding-inline-start: 12px; border-inline-start: 2px solid var(--ui-border); font-size: var(--ui-font-heading); font-weight: 700; line-height: 1.5; overflow-wrap: anywhere; }
.demo-solution-label { margin: 0 0 8px; font-size: var(--ui-font-control); color: var(--ui-accent); }
.demo-solution h3 { margin: 0 0 12px; font-size: var(--demo-solution-title-size); line-height: 1.4; color: var(--ui-accent); overflow-wrap: anywhere; text-wrap: balance; }
.demo-solution #demo-purpose-copy { margin: 0; font-size: var(--ui-font-size); overflow-wrap: anywhere; text-wrap: balance; }
.demo-status { color: var(--ui-accent); overflow-wrap: anywhere; }
.demo-status:empty { display: none; }
.demo-actions { display: flex; justify-content: flex-end; }
.demo-actions button { min-height: 44px; padding: 8px 16px; border: 1px solid var(--ui-border); border-radius: var(--radius-btn);
  background: var(--ui-bg); color: var(--ui-text); font: inherit; cursor: pointer; }
.demo-dialog button:disabled, .demo-dialog a[aria-disabled="true"] { opacity: .6; cursor: wait; }
@media (max-width: 899px) {
  .demo-launch { padding: 6px 8px; font-size: 12px; }
  .demo-dialog { padding: 20px; }
}

/* 全屏阅读时避开正文顶部状态行，入口仍留在页面最左侧。 */
body.reader-mode-reader-only .demo-launch-group { top: calc(var(--menubar-h) + 44px); }

/* 真实资料与功能展示分成两块可点击入口，配色沿用公共令牌。 */
.demo-choices { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.demo-choice { display: grid; gap: 8px; width: 100%; min-width: 0; box-sizing: border-box;
  padding: 16px; border: 1px solid var(--ui-border); border-radius: var(--radius-btn);
  background: var(--ui-bg); color: var(--ui-text); font: inherit; text-align: start;
  text-decoration: none; white-space: normal; overflow-wrap: anywhere; cursor: pointer; }
.demo-choice:hover { border-color: var(--ui-accent); }
.demo-tour-entry { border-color: var(--ui-accent); }
.demo-choice-title { font-size: 16px; font-weight: 700; color: var(--ui-accent); }
.demo-choice-note { font-size: 14px; line-height: 1.6; text-wrap: balance; }
.demo-choice-hint, .demo-save-note { font-size: 12px; line-height: 1.6; color: var(--ui-muted); }
.demo-save-note { margin: 16px 0; }
.demo-dialog--import { width: min(560px, calc(100vw - 48px)); }
.demo-dialog--import h2 { color: var(--ui-text); font-size: var(--ui-font-page-title); line-height: 1.5; text-wrap: balance; }
.demo-dialog--import .demo-choices { grid-template-columns: minmax(0, 1fr); }
.demo-dialog--import .demo-import { border-color: var(--ui-accent); background: var(--ui-accent-soft); }
.demo-dialog--import [hidden] { display: none !important; }

/* 窄屏按阅读顺序排列，正文和操作都在窗口内部滚动。 */
@media (max-width: 599px) {
  .demo-problem-list, .demo-choices { grid-template-columns: 1fr; }
  .demo-problem-list { gap: 8px; }
  .demo-purpose { padding: 16px; }
  .demo-solution h3 { font-size: var(--ui-font-page-title); }
}
