/* ==========================================================================
   Wild OS 交互演示 · 组件样式  v3
   ------------------------------------------------------------------------
   形态：一个始终不变的桌面应用窗口，三栏工作区，四个阶段发生在窗口内部。
   气质：纯白工作区 + 中性浅灰侧栏 + 近黑正文。统一 1px 细边框、克制圆角，
         不用米黄纸感、暖色台面和厚重阴影。关键判断靠细线与小标记醒目，
         不靠大片彩色。
   作用域：全部限定在 .wildos-demo 内，不触碰任何全局元素。前缀：wdos-
   ========================================================================== */

.wildos-demo {
  /* --- 中性色阶：从近黑到浅灰，不带暖调 --- */
  --wd-ink: #0d0d0d;
  --wd-text: #1f1f1f;
  --wd-dim: #5d5d5d;
  --wd-faint: #8a8a8a;
  --wd-ghost: #b0b0b0;

  --wd-line: #ececec;
  --wd-line-2: #e0e0e0;
  --wd-line-3: #d4d4d4;

  --wd-win: #ffffff;
  --wd-chrome: #f7f7f7;
  --wd-chrome-2: #f2f2f2;
  --wd-sel: #eaeaea;
  --wd-hover: #f3f3f3;
  --wd-desk: #f0f0f0;

  --wd-mark: #ebebeb;          /* 引用高亮：中性，不用荧光色 */

  /* 关键判断：只用在细线、小标记和短文字上 */
  --wd-key: #b42318;
  --wd-key-soft: #fdf4f3;
  --wd-key-line: #eed3d0;

  /* 窗口交通灯（macOS 原色，要全灰把这三个改成 #c9c9c9 即可） */
  --wd-tl-1: #ff5f57;
  --wd-tl-2: #febc2e;
  --wd-tl-3: #28c840;

  /* --- 圆角：克制且统一 --- */
  --wd-r-xs: 3px;
  --wd-r-sm: 5px;
  --wd-r: 6px;
  --wd-r-lg: 8px;
  --wd-r-win: 10px;

  /* --- 动 --- */
  --wd-ease: cubic-bezier(0.16, 1, 0.3, 1);
  --wd-ease-soft: cubic-bezier(0.33, 1, 0.68, 1);

  /* --- 量 --- */
  --wd-side-w: 204px;
  --wd-insp-w: 280px;
  --wd-body-h: 478px;

  /* --- 字 --- */
  --wd-ui: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Inter', 'Helvetica Neue',
           var(--font, 'PingFang SC'), 'PingFang SC', 'Noto Sans SC', 'Microsoft YaHei', sans-serif;

  container-type: inline-size;
  container-name: wildos;
  position: relative;
  max-width: 1280px;
  margin-inline: auto;
  color: var(--wd-text);
  font-family: var(--wd-ui);
  font-size: 13px;
  line-height: 1.6;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  line-break: strict;
  word-break: normal;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

/* --- 组件内重置：零特异度 --- */
.wildos-demo :where(*, *::before, *::after) { box-sizing: border-box; }
.wildos-demo :where(h2, h3, h4, p, ol, ul, dl, dt, dd, figure, mark) { margin: 0; }
.wildos-demo :where(ol, ul) { padding: 0; list-style: none; }
.wildos-demo :where(h2, h3, h4) { font-size: inherit; font-weight: 400; }
.wildos-demo :where(mark) { background: none; color: inherit; }
.wildos-demo :where(button) {
  font: inherit; color: inherit; background: none; border: 0;
  padding: 0; margin: 0; cursor: pointer; text-align: inherit;
  -webkit-appearance: none; appearance: none;
}
.wildos-demo :focus-visible { outline: 2px solid var(--wd-ink); outline-offset: 1px; border-radius: var(--wd-r-xs); }

/* ==========================================================================
   台面与窗口
   ========================================================================== */

.wdos-desk {
  padding: clamp(20px, 2.6vw, 40px);
  background: var(--wd-desk);
  border-radius: var(--wd-r-sm);
}

.wdos-win {
  border-radius: var(--wd-r-win);
  background: var(--wd-win);
  box-shadow:
    0 0 0 1px rgba(13, 13, 13, .08),
    0 1px 2px rgba(13, 13, 13, .04),
    0 10px 26px -10px rgba(13, 13, 13, .12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* --- 标题栏 --- */

.wdos-titlebar {
  flex: none;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  height: 40px;
  padding: 0 12px;
  background: var(--wd-chrome);
  border-bottom: 1px solid var(--wd-line-2);
}

.wdos-lights { display: flex; gap: 8px; align-items: center; }
.wdos-lights i { width: 11px; height: 11px; border-radius: 50%; }
.wdos-lights i:nth-child(1) { background: var(--wd-tl-1); }
.wdos-lights i:nth-child(2) { background: var(--wd-tl-2); }
.wdos-lights i:nth-child(3) { background: var(--wd-tl-3); }

.wdos-wintitle {
  justify-self: center;
  display: flex; align-items: baseline; gap: 8px; min-width: 0;
}
.wdos-wintitle b { font-weight: 580; font-size: 13px; color: var(--wd-ink); white-space: nowrap; }
.wdos-wintitle span { font-size: 12.5px; color: var(--wd-dim); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wdos-wintitle .wdos-crumb { color: var(--wd-ghost); flex: none; }

.wdos-tbar { display: flex; align-items: center; gap: 4px; }

.wildos-demo .wdos-icobtn {
  width: 26px; height: 24px; border-radius: var(--wd-r-sm);
  display: grid; place-items: center;
  color: var(--wd-dim);
  transition: background-color .15s var(--wd-ease-soft), color .15s var(--wd-ease-soft);
}
.wildos-demo .wdos-icobtn:hover { background: rgba(13, 13, 13, .06); color: var(--wd-ink); }
.wildos-demo .wdos-icobtn[aria-pressed="false"] { color: var(--wd-ghost); }
.wdos-icobtn svg { width: 15px; height: 15px; display: block; }

/* --- 三栏主体 --- */

.wdos-body {
  flex: none;                       /* flex:1 会让 flex-basis:0 盖掉 height */
  display: grid;
  grid-template-columns: var(--wd-side-w) minmax(0, 1fr) var(--wd-insp-w);
  min-height: var(--wd-body-h);
  height: var(--wd-body-h);
  overflow: hidden;
}
.wdos-side, .wdos-main, .wdos-insp { min-height: 0; min-width: 0; }

.wildos-demo[data-side="0"] { --wd-side-w: 0px; }
.wildos-demo[data-side="0"] .wdos-side { display: none; }
.wildos-demo[data-insp="0"] { --wd-insp-w: 0px; }
.wildos-demo[data-insp="0"] .wdos-insp { display: none; }

/* ==========================================================================
   左侧栏
   ========================================================================== */

.wdos-side {
  background: var(--wd-chrome);
  border-right: 1px solid var(--wd-line-2);
  padding: 9px 0 0;
  overflow: hidden auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
}

/* 侧栏顶部：这是 Wild OS 里的哪一个项目 */
.wdos-proj {
  margin: 0 8px 13px;
  padding: 9px 10px 10px;
  border-radius: var(--wd-r);
  border: 1px solid var(--wd-line-2);
  background: var(--wd-win);
}
.wdos-proj-l { display: block; font-size: 11px; letter-spacing: .04em; color: var(--wd-faint); }
.wdos-proj-n { display: block; margin-top: 3px; font-size: 12.5px; line-height: 1.5; color: var(--wd-ink); font-weight: 500; }

.wdos-sec { padding: 0 8px; }
.wdos-sec + .wdos-sec { margin-top: 14px; }

.wdos-sec-t {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 0 8px 6px;
  font-size: 11px; letter-spacing: .04em; color: var(--wd-faint);
}
.wdos-sec-t b { font-weight: 400; }

.wdos-nav { display: flex; flex-direction: column; gap: 1px; }

.wildos-demo .wdos-navitem {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 28px;
  padding: 0 8px;
  border-radius: var(--wd-r);
  font-size: 13px;
  color: var(--wd-text);
  transition: background-color .15s var(--wd-ease-soft), color .15s var(--wd-ease-soft);
}
.wildos-demo .wdos-navitem:hover { background: var(--wd-hover); }
.wildos-demo .wdos-navitem[data-on="1"] { background: var(--wd-sel); color: var(--wd-ink); font-weight: 500; }
.wdos-navitem svg { width: 15px; height: 15px; display: block; color: var(--wd-dim); }
.wdos-navitem[data-on="1"] svg { color: var(--wd-ink); }
.wdos-navitem > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wdos-count {
  font-size: 11.5px; color: var(--wd-faint);
  font-variant-numeric: tabular-nums;
  transition: color .3s var(--wd-ease);
}
.wdos-count[data-bump] { color: var(--wd-ink); }

.wdos-badge {
  min-width: 17px; height: 17px; padding: 0 5px;
  border-radius: var(--wd-r-xs);
  background: var(--wd-key); color: #fff;
  font-size: 11px; line-height: 17px; text-align: center;
  font-variant-numeric: tabular-nums;
  animation: wdos-pop .3s var(--wd-ease) both;
}
@keyframes wdos-pop { from { opacity: 0; transform: scale(.7); } to { opacity: 1; transform: none; } }

/* 侧栏里的资料条目：可点，点了就打开 */
.wildos-demo .wdos-file {
  display: grid;
  grid-template-columns: 15px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  height: 26px;
  padding: 0 8px;
  border-radius: var(--wd-r-sm);
  font-size: 12.5px;
  color: var(--wd-dim);
  transition: background-color .15s var(--wd-ease-soft), color .2s var(--wd-ease);
}
.wildos-demo .wdos-file:hover { background: var(--wd-hover); color: var(--wd-ink); }
.wdos-file > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wdos-file svg { width: 15px; height: 15px; display: block; color: var(--wd-ghost); }
.wdos-file[data-open="1"] { color: var(--wd-text); }
.wdos-file[data-open="1"] svg { color: var(--wd-dim); }
.wdos-file[data-cur="1"] { background: var(--wd-sel); color: var(--wd-ink); }

.wdos-tick {
  width: 14px; height: 14px; flex: none;
  opacity: 0; transform: scale(.7);
  transition: opacity .25s var(--wd-ease), transform .25s var(--wd-ease);
  color: var(--wd-dim);
}
.wdos-file[data-cited="1"] .wdos-tick { opacity: 1; transform: none; }
.wdos-tick svg { width: 14px; height: 14px; display: block; color: inherit; }

.wdos-side-foot {
  margin-top: auto;
  padding: 10px 16px 12px;
  border-top: 1px solid var(--wd-line-2);
  display: flex; align-items: center; gap: 9px;
}
.wdos-who {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: var(--wd-ink); color: #fff;
  font-size: 10.5px; display: grid; place-items: center;
}
.wdos-side-foot p { font-size: 11.5px; line-height: 1.35; color: var(--wd-faint); min-width: 0; }
.wdos-side-foot p b { display: block; font-weight: 400; color: var(--wd-text); font-size: 12px; }

/* ==========================================================================
   中间工作区
   ========================================================================== */

.wdos-main {
  background: var(--wd-win);
  display: flex; flex-direction: column;
  min-width: 0; position: relative;
}

.wdos-view {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; min-width: 0;
  opacity: 0; visibility: hidden;
  transform: translate3d(0, 4px, 0);
  transition: opacity .28s var(--wd-ease), transform .36s var(--wd-ease), visibility 0s linear .28s;
  pointer-events: none;
}
.wdos-view.is-on {
  opacity: 1; visibility: visible; transform: none; pointer-events: auto;
  transition: opacity .34s var(--wd-ease) .04s, transform .44s var(--wd-ease) .04s, visibility 0s;
}

/* --- 文档标签栏 --- */

.wdos-tabs {
  flex: none;
  display: flex; align-items: stretch;
  height: 34px;
  background: var(--wd-chrome-2);
  border-bottom: 1px solid var(--wd-line-2);
  overflow: hidden auto;
  scrollbar-width: none;
}
.wdos-tabs::-webkit-scrollbar { display: none; }

.wdos-tab {
  display: flex; align-items: center;
  max-width: 200px; min-width: 0;
  padding-right: 5px;
  border-right: 1px solid var(--wd-line-2);
  font-size: 12.5px;
  color: var(--wd-dim);
  opacity: 0;
  transform: translate3d(-5px, 0, 0);
  transition: opacity .26s var(--wd-ease), transform .3s var(--wd-ease),
              background-color .15s var(--wd-ease-soft), color .15s var(--wd-ease-soft);
}
.wdos-tab.is-in { opacity: 1; transform: none; }
.wdos-tab:hover { background: rgba(13, 13, 13, .035); color: var(--wd-ink); }
.wdos-tab[data-on="1"] { background: var(--wd-win); color: var(--wd-ink); }

.wildos-demo .wdos-tab-n {
  flex: 1; min-width: 0;
  display: flex; align-items: center;
  height: 33px; padding: 0 7px 0 12px;
  color: inherit;
}
.wdos-tab-n > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.wildos-demo .wdos-x {
  width: 17px; height: 17px; flex: none;
  border-radius: var(--wd-r-xs);
  display: grid; place-items: center;
  color: var(--wd-ghost); opacity: 0;
  transition: opacity .15s var(--wd-ease-soft), background-color .15s var(--wd-ease-soft), color .15s var(--wd-ease-soft);
}
.wdos-tab:hover .wdos-x, .wdos-tab[data-on="1"] .wdos-x { opacity: 1; }
.wildos-demo .wdos-x:hover { background: rgba(13, 13, 13, .09); color: var(--wd-ink); }
.wdos-x svg { width: 9px; height: 9px; display: block; }

/* --- 文档正文 --- */

.wdos-doc {
  flex: 1; min-height: 0;
  overflow: hidden auto;
  padding: 24px clamp(22px, 3.4vw, 44px) 34px;
  scroll-behavior: smooth;
}
.wdos-doc > * { max-width: 46em; }

.wdos-doc-head { padding-bottom: 14px; border-bottom: 1px solid var(--wd-line); margin-bottom: 18px; }
.wdos-doc-title { font-size: 17px; font-weight: 580; color: var(--wd-ink); line-height: 1.45; letter-spacing: -.005em; }
.wdos-doc-meta { margin-top: 5px; font-size: 12px; color: var(--wd-faint); }
.wdos-doc-meta i { font-style: normal; color: var(--wd-ghost); padding: 0 6px; }

.wdos-doc p, .wdos-doc li { font-size: 13.5px; line-height: 1.95; color: var(--wd-text); }
.wdos-doc p + p, .wdos-doc p + ol, .wdos-doc ol + p { margin-top: 12px; }
.wdos-doc p + h4, .wdos-doc ol + h4 { margin-top: 20px; }
.wdos-doc h4 { font-size: 12.5px; color: var(--wd-dim); margin-bottom: 7px; font-weight: 500; }
.wdos-doc b { font-weight: 500; color: var(--wd-ink); }
.wdos-doc-more { margin-top: 16px !important; padding-top: 12px; border-top: 1px solid var(--wd-line);
  font-size: 12px !important; color: var(--wd-faint) !important; }

/* 引用高亮：中性底 + 实线下划线，不用彩色 */
.wdos-mark {
  background: linear-gradient(transparent 56%, var(--wd-mark) 56%) left center / 0% 100% no-repeat;
  box-shadow: inset 0 -1px 0 transparent;
  transition: background-size .58s var(--wd-ease-soft), box-shadow .3s var(--wd-ease);
  padding: 1px 0;
}
.wdos-mark.is-on { background-size: 100% 100%; box-shadow: inset 0 -1px 0 var(--wd-dim); }
.wdos-mark::after {
  content: attr(data-ref);
  font-size: 10px; vertical-align: 5px; margin-left: 3px;
  color: var(--wd-dim); opacity: 0;
  transition: opacity .26s var(--wd-ease) .28s;
}
.wdos-mark.is-on::after { opacity: 1; }
.wdos-mark.is-hit { animation: wdos-hit 1.1s var(--wd-ease); }
@keyframes wdos-hit {
  0%, 100% { background-color: transparent; }
  18%, 64% { background-color: rgba(13, 13, 13, .09); }
}

/* ==========================================================================
   任务视图（02 / 03 共用）
   ========================================================================== */

.wdos-vhead {
  flex: none;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 12px;
  padding: 0 clamp(16px, 2.2vw, 24px);
  height: 42px;
  border-bottom: 1px solid var(--wd-line);
}
.wdos-vtitle { font-size: 13.5px; font-weight: 580; color: var(--wd-ink); min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wdos-vsub { font-size: 12px; color: var(--wd-faint); margin-left: 9px; font-weight: 400; }

.wdos-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 22px; padding: 0 9px;
  border-radius: var(--wd-r-sm);
  border: 1px solid var(--wd-line-2);
  font-size: 11.5px; color: var(--wd-dim); white-space: nowrap;
  transition: border-color .3s var(--wd-ease), color .3s var(--wd-ease);
}
.wdos-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--wd-ghost); flex: none; }
.wdos-pill[data-s="run"] { color: var(--wd-ink); border-color: var(--wd-line-3); }
.wdos-pill[data-s="run"] i { background: var(--wd-ink); animation: wdos-blink 1.15s steps(1, end) infinite; }
.wdos-pill[data-s="wait"] { color: var(--wd-key); border-color: var(--wd-key-line); }
.wdos-pill[data-s="wait"] i { background: var(--wd-key); }
.wdos-pill[data-s="done"] { color: var(--wd-dim); }
.wdos-pill[data-s="done"] i { background: var(--wd-dim); }

@keyframes wdos-blink { 0%, 58% { opacity: 1; } 59%, 100% { opacity: .2; } }

.wdos-stream {
  flex: 1; min-height: 0;
  overflow: hidden auto;
  padding: 4px clamp(16px, 2.2vw, 24px) 20px;
  scroll-behavior: smooth;
}

/* --- 步骤行 --- */

.wdos-step {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: start;
  padding: 10px 0 11px;
  border-bottom: 1px solid var(--wd-line);
  opacity: 0;
  transform: translate3d(0, 3px, 0);
  transition: opacity .28s var(--wd-ease), transform .34s var(--wd-ease);
}
.wdos-step.is-in { opacity: 1; transform: none; }

.wdos-dot {
  position: relative;
  width: 16px; height: 16px; margin-top: 2px;
  border-radius: 50%;
  border: 1px solid var(--wd-line-3);
  display: grid; place-items: center;
  color: #fff;
  transition: border-color .25s var(--wd-ease), background-color .25s var(--wd-ease);
}
.wdos-dot svg { width: 9px; height: 9px; display: block; opacity: 0; transition: opacity .2s var(--wd-ease); }
.wdos-step[data-s="done"] .wdos-dot { background: var(--wd-ink); border-color: var(--wd-ink); }
.wdos-step[data-s="done"] .wdos-dot svg { opacity: 1; }
.wdos-step[data-s="run"] .wdos-dot { border-color: var(--wd-ink); border-width: 1.5px; }
.wdos-step[data-s="run"] .wdos-dot::after {
  content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--wd-ink);
  animation: wdos-blink 1.15s steps(1, end) infinite;
}
.wdos-step[data-s="fail"] .wdos-dot { border-color: var(--wd-dim); }
.wdos-step[data-s="fail"] .wdos-dot::after {
  content: ''; width: 7px; height: 1.5px; border-radius: 1px; background: var(--wd-dim);
}

.wdos-step-n { display: block; max-width: 34em; font-size: 13.5px; line-height: 1.55; color: var(--wd-dim); }
.wdos-step[data-s="done"] .wdos-step-n,
.wdos-step[data-s="run"] .wdos-step-n,
.wdos-step[data-s="fail"] .wdos-step-n { color: var(--wd-ink); }

.wdos-io {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  margin-top: 7px;
  font-size: 12px; color: var(--wd-faint);
}
.wdos-io b { font-weight: 400; color: var(--wd-faint); }

.wildos-demo .wdos-chip {
  display: inline-flex; align-items: center; gap: 5px;
  height: 21px; padding: 0 8px;
  border-radius: var(--wd-r-sm);
  border: 1px solid var(--wd-line-2);
  background: var(--wd-win);
  color: var(--wd-dim);
  font-size: 12px;
  white-space: nowrap; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis;
  transition: border-color .15s var(--wd-ease-soft), color .15s var(--wd-ease-soft), background-color .15s var(--wd-ease-soft);
}
.wildos-demo button.wdos-chip:hover { border-color: var(--wd-line-3); background: var(--wd-hover); color: var(--wd-ink); }
.wdos-chip[data-k="out"] { border-color: var(--wd-line-3); color: var(--wd-ink); }
.wdos-chip svg { width: 12px; height: 12px; flex: none; color: var(--wd-ghost); }
.wdos-arrow { color: var(--wd-ghost); font-size: 12px; }

.wdos-state {
  font-size: 12px; color: var(--wd-faint); white-space: nowrap; padding-top: 3px;
  font-variant-numeric: tabular-nums;
}
.wdos-step[data-s="done"] .wdos-state { color: var(--wd-faint); }
.wdos-step[data-s="run"] .wdos-state { color: var(--wd-ink); }
.wdos-step[data-s="fail"] .wdos-state { color: var(--wd-key); }

/* 失败原因：左细线 + 可读字号 */
.wdos-note {
  grid-column: 2 / -1;
  margin-top: 9px;
  padding: 2px 0 2px 13px;
  border-left: 2px solid var(--wd-line-3);
  font-size: 12.5px; line-height: 1.75; color: var(--wd-dim);
}
.wdos-note b { font-weight: 500; color: var(--wd-ink); }

/* 手机上折叠已完成步骤时的展开条 */
.wildos-demo .wdos-fold {
  display: none;
  width: 100%;
  align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 11px;
  margin: 6px 0 2px;
  border-radius: var(--wd-r);
  border: 1px solid var(--wd-line-2);
  background: var(--wd-chrome-2);
  font-size: 12.5px; color: var(--wd-dim);
}
.wdos-fold svg { width: 13px; height: 13px; transition: transform .24s var(--wd-ease); }
.wdos-stream[data-fold="0"] .wdos-fold svg { transform: rotate(180deg); }

/* ==========================================================================
   确认请求（长在任务流里，不是弹窗）
   ========================================================================== */

.wdos-ask {
  margin: 14px 0 4px;
  border-radius: var(--wd-r-lg);
  background: var(--wd-win);
  border: 1px solid var(--wd-line-3);
  box-shadow: 0 1px 2px rgba(13, 13, 13, .04), 0 10px 24px -14px rgba(13, 13, 13, .18);
  overflow: hidden;
  opacity: 0;
  transform: translate3d(0, 6px, 0);
  transition: opacity .38s var(--wd-ease), transform .46s var(--wd-ease);
}
.wdos-ask.is-in { opacity: 1; transform: none; }

.wdos-ask-t {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 9px;
  padding: 11px 14px 10px;
  border-bottom: 1px solid var(--wd-line);
  font-size: 12.5px; color: var(--wd-ink);
}
.wdos-ask-t b { font-weight: 580; }
.wdos-ask-t i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--wd-key); flex: none;
}
.wdos-ask-t time { font-size: 11.5px; color: var(--wd-faint); font-variant-numeric: tabular-nums; }

.wdos-ask-b { padding: 13px 14px 14px; }
.wdos-ask-why { font-size: 13px; line-height: 1.75; color: var(--wd-dim); margin-bottom: 12px; max-width: 46em; }

.wdos-opts { display: flex; flex-direction: column; gap: 7px; }

.wildos-demo .wdos-opt {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  column-gap: 11px;
  align-items: start;
  width: 100%;
  padding: 11px 13px 12px;
  border-radius: var(--wd-r);
  border: 1px solid var(--wd-line-2);
  background: var(--wd-win);
  transition: border-color .18s var(--wd-ease-soft), background-color .18s var(--wd-ease-soft);
}
.wildos-demo .wdos-opt:hover { border-color: var(--wd-line-3); background: var(--wd-hover); }
.wildos-demo .wdos-opt[aria-checked="true"] { border-color: var(--wd-ink); background: var(--wd-win); box-shadow: inset 0 0 0 1px var(--wd-ink); }

.wdos-radio {
  width: 15px; height: 15px; margin-top: 2px; border-radius: 50%;
  border: 1px solid var(--wd-line-3);
  display: grid; place-items: center;
  transition: border-color .18s var(--wd-ease-soft);
}
.wdos-radio::after {
  content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--wd-ink);
  transform: scale(0); transition: transform .2s var(--wd-ease);
}
.wdos-opt[aria-checked="true"] .wdos-radio { border-color: var(--wd-ink); }
.wdos-opt[aria-checked="true"] .wdos-radio::after { transform: scale(1); }

.wdos-opt-n { display: block; font-size: 13.5px; color: var(--wd-ink); line-height: 1.5; font-weight: 500; }
.wdos-opt-f {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 6px 18px; margin-top: 8px;
}
.wdos-opt-f span { display: block; font-size: 12.5px; line-height: 1.6; color: var(--wd-text); }
.wdos-opt-f b { display: block; font-weight: 400; font-size: 11.5px; color: var(--wd-faint); margin-bottom: 1px; }

.wdos-ask-f {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 16px;
  margin-top: 13px; padding-top: 12px;
  border-top: 1px solid var(--wd-line);
}
.wdos-hint { font-size: 12.5px; line-height: 1.7; color: var(--wd-dim); max-width: 44em; }
.wdos-hint b { font-weight: 500; color: var(--wd-ink); }

.wildos-demo .wdos-go {
  display: inline-flex; align-items: center; gap: 7px;
  height: 32px; padding: 0 15px;
  border-radius: var(--wd-r);
  background: var(--wd-ink); color: #fff;
  font-size: 13px; white-space: nowrap;
  transition: opacity .18s var(--wd-ease-soft), transform .18s var(--wd-ease-soft), background-color .18s var(--wd-ease-soft);
}
.wildos-demo .wdos-go:hover { background: #000; }
.wildos-demo .wdos-go:active { transform: scale(.985); }
.wildos-demo .wdos-go[disabled] { background: var(--wd-chrome-2); color: var(--wd-ghost); cursor: default; }
.wdos-go svg { width: 13px; height: 13px; }

/* --- 确认之后的记录行 --- */

.wdos-rec {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start; gap: 11px;
  margin: 14px 0 4px;
  padding: 12px 14px;
  border-radius: var(--wd-r-lg);
  border: 1px solid var(--wd-line-2);
  border-left: 2px solid var(--wd-key);
  background: var(--wd-win);
  animation: wdos-press .4s var(--wd-ease) both;
}
.wdos-rec-i { width: 16px; height: 16px; margin-top: 1px; color: var(--wd-key); }
.wdos-rec-i svg { width: 16px; height: 16px; display: block; }
.wdos-rec-n { display: block; font-size: 13px; color: var(--wd-ink); line-height: 1.5; }
.wdos-rec-n b { font-weight: 580; }
.wdos-rec-s { display: block; margin-top: 4px; font-size: 12.5px; line-height: 1.65; color: var(--wd-dim); }
.wdos-rec time { font-size: 11.5px; color: var(--wd-faint); white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 2px; }

@keyframes wdos-press {
  0% { opacity: 0; transform: translate3d(0, 4px, 0); }
  100% { opacity: 1; transform: none; }
}

/* --- 本轮成果已就绪 --- */

.wdos-ready {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center; gap: 11px;
  margin: 10px 0 4px;
  padding: 11px 14px;
  border-radius: var(--wd-r-lg);
  border: 1px solid var(--wd-line-2);
  background: var(--wd-chrome-2);
  animation: wdos-press .4s var(--wd-ease) both;
}
.wdos-ready-i { width: 16px; height: 16px; color: var(--wd-dim); }
.wdos-ready-i svg { width: 16px; height: 16px; display: block; }
.wdos-ready p { font-size: 12.5px; color: var(--wd-text); line-height: 1.5; }
.wildos-demo .wdos-ready .wdos-go { height: 30px; font-size: 12.5px; }

/* ==========================================================================
   成果视图
   ========================================================================== */

.wdos-out { flex: 1; min-height: 0; overflow: hidden auto; padding: 2px clamp(16px, 2.2vw, 24px) 10px; }

.wdos-grp-t {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 12px 0 6px;
  font-size: 11.5px; letter-spacing: .03em; color: var(--wd-faint);
}
.wdos-grp-t b { font-weight: 500; color: var(--wd-dim); }
.wdos-grp-t span { font-variant-numeric: tabular-nums; }

.wildos-demo .wdos-row {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  column-gap: 12px;
  align-items: start;
  width: 100%;
  padding: 9px 10px 10px;
  margin: 0 -10px;
  border-radius: var(--wd-r);
  opacity: 0;
  transform: translate3d(0, 4px, 0);
  transition: opacity .3s var(--wd-ease), transform .36s var(--wd-ease), background-color .15s var(--wd-ease-soft);
}
.wdos-row.is-in { opacity: 1; transform: none; }
.wildos-demo button.wdos-row:hover { background: var(--wd-hover); }
.wdos-row + .wdos-row { box-shadow: 0 -1px 0 var(--wd-line); }

.wdos-fi { width: 24px; height: 24px; margin-top: 1px; color: var(--wd-ghost); }
.wdos-fi svg { width: 24px; height: 24px; display: block; }
.wdos-row[data-sealed="1"] .wdos-fi { color: var(--wd-key); }

.wdos-fn { display: block; font-size: 13.5px; color: var(--wd-ink); line-height: 1.5; }
.wdos-fs { display: block; max-width: 40em; margin-top: 4px; font-size: 12.5px; line-height: 1.7; color: var(--wd-dim); }
.wdos-fm {
  font-size: 11.5px; color: var(--wd-faint); white-space: nowrap; padding-top: 3px;
  font-variant-numeric: tabular-nums; text-align: right;
}
.wdos-fm b { display: block; font-weight: 400; color: var(--wd-dim); }

.wdos-seal {
  display: inline-flex; align-items: center; gap: 5px;
  margin-top: 6px; padding: 3px 7px 4px;
  border-radius: var(--wd-r-xs);
  border: 1px solid var(--wd-key-line);
  color: var(--wd-key);
  font-size: 11.5px; line-height: 1.2; white-space: nowrap;
}
.wdos-seal svg { width: 11px; height: 11px; display: block; }

.wdos-kb {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 16px;
  margin-top: 2px; padding: 11px 13px;
  border-radius: var(--wd-r);
  border: 1px solid var(--wd-line-2);
  background: var(--wd-win);
  opacity: 0; transform: translate3d(0, 4px, 0);
  transition: opacity .3s var(--wd-ease), transform .36s var(--wd-ease);
}
.wdos-kb.is-in { opacity: 1; transform: none; }
.wdos-kb-p { display: block; font-size: 11.5px; color: var(--wd-faint); }
.wdos-kb-n { display: block; font-size: 13px; color: var(--wd-ink); line-height: 1.55; margin-top: 3px; }
.wildos-demo .wdos-kb-s {
  display: inline-flex; align-items: center; gap: 6px;
  height: 27px; padding: 0 10px;
  border-radius: var(--wd-r-sm);
  border: 1px solid var(--wd-line-2);
  font-size: 12px; color: var(--wd-dim); white-space: nowrap;
  transition: border-color .15s var(--wd-ease-soft), color .15s var(--wd-ease-soft), background-color .15s var(--wd-ease-soft);
}
.wildos-demo button.wdos-kb-s:hover { border-color: var(--wd-line-3); background: var(--wd-hover); color: var(--wd-ink); }
.wdos-kb-s svg { width: 13px; height: 13px; flex: none; }

.wdos-empty {
  flex: 1; display: grid; place-items: center; text-align: center; padding: 30px 24px;
}
.wdos-empty-in { max-width: 25em; }
.wdos-empty-i {
  width: 34px; height: 34px; margin: 0 auto 13px;
  border-radius: var(--wd-r); display: grid; place-items: center;
  color: var(--wd-ghost); border: 1px solid var(--wd-line-2);
}
.wdos-empty p { font-size: 13px; color: var(--wd-dim); line-height: 1.75; }

/* ==========================================================================
   右栏「项目上下文」—— 会累加，也会更新状态
   ========================================================================== */

.wdos-insp {
  background: var(--wd-chrome);
  border-left: 1px solid var(--wd-line-2);
  display: flex; flex-direction: column;
  min-width: 0; overflow: hidden;
}

.wdos-insp-t {
  flex: none;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  height: 34px; padding: 0 13px;
  border-bottom: 1px solid var(--wd-line-2);
  font-size: 12px; color: var(--wd-dim);
}
.wdos-insp-t b { font-weight: 500; color: var(--wd-ink); font-size: 12.5px; }
.wdos-insp-t span { font-size: 11.5px; color: var(--wd-faint); font-variant-numeric: tabular-nums; }

.wdos-ctx { flex: 1; min-height: 0; overflow: hidden auto; padding: 6px 9px 12px; scroll-behavior: smooth; }

.wdos-ctx-i {
  padding: 9px 10px 10px;
  border-radius: var(--wd-r);
  animation: wdos-slide .34s var(--wd-ease) both;
  transition: background-color .3s var(--wd-ease), box-shadow .3s var(--wd-ease);
}
.wdos-ctx-i + .wdos-ctx-i { box-shadow: 0 -1px 0 var(--wd-line-2); }
.wdos-ctx-k {
  display: flex; align-items: center; gap: 7px;
  font-size: 11.5px; color: var(--wd-faint);
}
.wdos-ctx-k i { width: 5px; height: 5px; border-radius: 50%; background: var(--wd-ghost); flex: none; }
.wdos-ctx-s {
  margin-left: auto; padding: 1px 6px 2px;
  border-radius: var(--wd-r-xs);
  border: 1px solid var(--wd-line-2);
  background: var(--wd-win);
  font-size: 11px; color: var(--wd-dim); white-space: nowrap;
}
.wdos-ctx-v { display: block; margin-top: 5px; font-size: 12.5px; line-height: 1.65; color: var(--wd-text); }

.wildos-demo .wdos-ctx-c {
  display: inline-block; margin-top: 5px;
  font-size: 11.5px; line-height: 1.5; color: var(--wd-faint);
  border-bottom: 1px solid transparent;
  transition: color .15s var(--wd-ease-soft), border-color .15s var(--wd-ease-soft);
}
.wildos-demo button.wdos-ctx-c:hover { color: var(--wd-ink); border-bottom-color: var(--wd-line-3); }

.wdos-ctx-i[data-k="open"] .wdos-ctx-k i { background: transparent; box-shadow: inset 0 0 0 1px var(--wd-ghost); }
.wdos-ctx-i[data-k="open"] .wdos-ctx-s { color: var(--wd-key); border-color: var(--wd-key-line); }
.wdos-ctx-i[data-k="work"] .wdos-ctx-k i { background: var(--wd-dim); }
.wdos-ctx-i[data-k="work"] .wdos-ctx-s { color: var(--wd-ink); }
.wdos-ctx-i[data-k="solved"] { background: var(--wd-win); box-shadow: inset 0 0 0 1px var(--wd-line-2); }
.wdos-ctx-i[data-k="solved"] + .wdos-ctx-i { box-shadow: none; }
.wdos-ctx-i[data-k="solved"] .wdos-ctx-k i { background: var(--wd-ink); }
.wdos-ctx-i[data-k="solved"] .wdos-ctx-s { color: var(--wd-ink); border-color: var(--wd-line-3); }

.wdos-ctx-i[data-k="key"] {
  background: var(--wd-win);
  box-shadow: inset 0 0 0 1px var(--wd-line-2);
  border-left: 2px solid var(--wd-key);
}
.wdos-ctx-i[data-k="key"] + .wdos-ctx-i { box-shadow: none; }
.wdos-ctx-i[data-k="key"] .wdos-ctx-k { color: var(--wd-key); }
.wdos-ctx-i[data-k="key"] .wdos-ctx-k i { background: var(--wd-key); }
.wdos-ctx-i[data-k="key"] .wdos-ctx-s { color: var(--wd-key); border-color: var(--wd-key-line); }

.wdos-ctx-i.is-focus { background: var(--wd-win); box-shadow: inset 0 0 0 1px var(--wd-ink); }
.wdos-ctx-i.is-changed { animation: wdos-flash 1.4s var(--wd-ease); }
@keyframes wdos-flash {
  0%, 100% { background-color: transparent; }
  14%, 58% { background-color: rgba(13, 13, 13, .07); }
}

@keyframes wdos-slide { from { opacity: 0; transform: translate3d(0, 5px, 0); } to { opacity: 1; transform: none; } }

.wdos-ctx-empty { padding: 14px 10px; font-size: 12.5px; line-height: 1.7; color: var(--wd-faint); }

.wdos-next {
  flex: none;
  border-top: 1px solid var(--wd-line-2);
  padding: 11px 13px 13px;
  background: var(--wd-chrome-2);
  animation: wdos-slide .4s var(--wd-ease) both;
}
.wdos-next-p { display: block; font-size: 11.5px; color: var(--wd-faint); }
.wdos-next-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 4px; }
.wdos-next-n { font-size: 13px; color: var(--wd-ink); line-height: 1.5; min-width: 0; font-weight: 500; }
.wdos-next-q {
  font-size: 11px; color: var(--wd-dim); white-space: nowrap;
  padding: 2px 6px 3px; border-radius: var(--wd-r-xs);
  border: 1px solid var(--wd-line-2); background: var(--wd-win);
}
.wdos-inh { margin-top: 9px; display: flex; flex-direction: column; gap: 4px; }
.wdos-inh li {
  display: grid; grid-template-columns: 40px minmax(0, 1fr); column-gap: 9px;
  font-size: 12px; line-height: 1.6; color: var(--wd-dim);
}
.wdos-inh li b { font-weight: 400; color: var(--wd-faint); }
.wdos-inh li[data-k="key"] { color: var(--wd-key); }
.wdos-inh li[data-k="key"] b { color: var(--wd-key); opacity: .72; }
.wdos-inh li[data-k="new"] { color: var(--wd-text); }

/* ==========================================================================
   状态栏
   ========================================================================== */

.wdos-status {
  flex: none;
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: center; gap: 14px;
  height: 30px; padding: 0 13px;
  background: var(--wd-chrome);
  border-top: 1px solid var(--wd-line-2);
  font-size: 12px; color: var(--wd-dim);
}
.wdos-st-l { display: flex; align-items: center; gap: 9px; min-width: 0; }
.wdos-st-l > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wdos-st-r { display: flex; align-items: center; gap: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.wdos-st-r b { font-weight: 500; color: var(--wd-ink); }
.wdos-sep { width: 1px; height: 12px; background: var(--wd-line-2); }

.wdos-st-dot {
  width: 7px; height: 7px; border-radius: 50%; flex: none;
  background: var(--wd-ghost);
  transition: background-color .3s var(--wd-ease);
}
.wdos-status[data-s="run"] .wdos-st-dot { background: var(--wd-ink); animation: wdos-blink 1.15s steps(1, end) infinite; }
.wdos-status[data-s="wait"] { color: var(--wd-key); }
.wdos-status[data-s="wait"] .wdos-st-dot { background: var(--wd-key); }
.wdos-status[data-s="done"] .wdos-st-dot { background: var(--wd-dim); }

.wdos-prog { width: 44px; height: 3px; border-radius: 2px; overflow: hidden; background: var(--wd-line-2); }
.wdos-prog i {
  display: block; height: 100%; width: 0; border-radius: 2px;
  background: var(--wd-ink);
  transition: width .5s var(--wd-ease);
}
.wdos-status[data-s="wait"] .wdos-prog i { background: var(--wd-key); }

/* ==========================================================================
   窗口外：一行说明 + 阶段 + 控制
   ========================================================================== */

.wdos-under {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  align-items: end; gap: 20px;
  margin-top: clamp(16px, 2vw, 24px);
}

.wdos-cap {
  font-size: 13.5px; line-height: 1.75; color: var(--wd-dim);
  max-width: 64em; min-height: 2.6em;
}
.wdos-cap b { font-weight: 500; color: var(--wd-ink); }

.wdos-ctrls { display: flex; align-items: center; gap: 8px; }

.wildos-demo .wdos-btn {
  display: inline-flex; align-items: center; gap: 7px;
  height: 34px; padding: 0 15px;
  border-radius: var(--wd-r);
  border: 1px solid var(--wd-line-2);
  font-size: 13px; color: var(--wd-text); white-space: nowrap;
  transition: border-color .18s var(--wd-ease-soft), color .18s var(--wd-ease-soft),
              background-color .18s var(--wd-ease-soft), transform .18s var(--wd-ease-soft);
}
.wildos-demo .wdos-btn:hover { border-color: var(--wd-line-3); background: var(--wd-hover); color: var(--wd-ink); }
.wildos-demo .wdos-btn:active { transform: scale(.985); }
.wildos-demo .wdos-btn[hidden] { display: none; }
.wildos-demo .wdos-btn--k { background: var(--wd-ink); border-color: var(--wd-ink); color: #fff; }
.wildos-demo .wdos-btn--k:hover { background: #000; border-color: #000; color: #fff; }
.wildos-demo .wdos-btn[disabled] { background: var(--wd-chrome-2); border-color: var(--wd-line-2); color: var(--wd-ghost); cursor: default; }
.wdos-btn svg { width: 13px; height: 13px; display: block; flex: none; }

.wdos-steps {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: clamp(14px, 1.8vw, 20px);
  border-top: 1px solid var(--wd-line);
}

.wildos-demo .wdos-sbtn {
  position: relative;
  padding: 12px 14px 0 0;
  transition: color .18s var(--wd-ease-soft);
}
.wildos-demo .wdos-sbtn + .wdos-sbtn { padding-left: 14px; }
.wdos-sbtn::before {
  content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 2px;
  background: var(--wd-line-3);
  transform: scaleX(0); transform-origin: left center;
  transition: transform .5s var(--wd-ease), background-color .18s var(--wd-ease-soft);
}
.wdos-sbtn[data-s="done"]::before { transform: scaleX(1); }
.wdos-sbtn[data-s="active"]::before { transform: scaleX(1); background: var(--wd-ink); }

.wdos-sn { display: block; font-size: 11px; letter-spacing: .08em; color: var(--wd-ghost); font-variant-numeric: tabular-nums; }
.wdos-sl { display: block; margin-top: 4px; font-size: 13px; line-height: 1.45; color: var(--wd-faint); }
.wdos-sbtn:hover .wdos-sl, .wdos-sbtn[data-s="done"] .wdos-sl { color: var(--wd-dim); }
.wdos-sbtn[data-s="active"] .wdos-sn { color: var(--wd-dim); }
.wdos-sbtn[data-s="active"] .wdos-sl { color: var(--wd-ink); font-weight: 500; }

.wdos-fine {
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--wd-line);
  display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  font-size: 11.5px; line-height: 1.7; color: var(--wd-faint);
}

.wdos-live {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.wildos-demo.is-paused * { animation-play-state: paused !important; }

/* 细滚动条 */
.wildos-demo ::-webkit-scrollbar { width: 10px; height: 10px; }
.wildos-demo ::-webkit-scrollbar-track { background: transparent; }
.wildos-demo ::-webkit-scrollbar-thumb {
  background: rgba(13, 13, 13, .16);
  border-radius: 5px; border: 3px solid transparent; background-clip: padding-box;
}
.wildos-demo ::-webkit-scrollbar-thumb:hover { background: rgba(13, 13, 13, .28); background-clip: padding-box; }

/* ==========================================================================
   容器查询
   ========================================================================== */

@container wildos (max-width: 1080px) {
  .wildos-demo { --wd-side-w: 180px; --wd-insp-w: 250px; --wd-body-h: 462px; }
}

@container wildos (max-width: 900px) {
  .wildos-demo { --wd-body-h: auto; }
  .wdos-body { grid-template-columns: var(--wd-side-w) minmax(0, 1fr); grid-template-rows: 340px auto; overflow: visible; }
  .wdos-side { grid-row: 1 / -1; }
  .wdos-main { grid-row: 1; }
  .wdos-insp {
    grid-column: 2; grid-row: 2;
    border-left: 0; border-top: 1px solid var(--wd-line-2);
    max-height: 220px;
  }
  .wdos-under { grid-template-columns: minmax(0, 1fr); row-gap: 14px; align-items: start; }
}

/* ==========================================================================
   手机：窗口保留，侧栏变横条，已完成步骤折叠，上下文按需展开
   ========================================================================== */

@container wildos (max-width: 680px) {
  .wildos-demo { font-size: 13.5px; }
  .wdos-desk { padding: 12px 10px 14px; border-radius: var(--wd-r-xs); }
  .wdos-win { border-radius: var(--wd-r-lg); }

  .wdos-titlebar { height: 38px; padding: 0 11px; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; }
  .wdos-lights i { width: 10px; height: 10px; }
  .wdos-wintitle { justify-self: start; flex-direction: column; gap: 0; align-items: flex-start; min-width: 0; }
  .wdos-wintitle b { font-size: 12.5px; }
  .wdos-wintitle span { font-size: 11px; max-width: 100%; }
  .wdos-wintitle .wdos-crumb { display: none; }
  .wdos-tbar [data-toggle="side"] { display: none; }

  .wdos-body {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(280px, auto) auto;
    height: auto; min-height: 0; overflow: visible;
  }

  .wdos-side {
    grid-row: 1; grid-column: 1;
    flex-direction: row; align-items: center; gap: 6px;
    border-right: 0; border-bottom: 1px solid var(--wd-line-2);
    padding: 7px 10px; overflow: auto hidden;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 calc(100% - 24px), transparent 100%);
  }
  .wdos-side::-webkit-scrollbar { display: none; }
  .wdos-sec { padding: 0; flex: none; }
  .wdos-sec + .wdos-sec { margin-top: 0; }
  .wdos-sec-t, .wdos-side .wdos-file, .wdos-side-foot, .wdos-proj { display: none; }
  .wdos-nav { flex-direction: row; gap: 6px; }
  .wildos-demo .wdos-navitem {
    height: 29px; padding: 0 11px; border-radius: var(--wd-r);
    border: 1px solid var(--wd-line-2); background: var(--wd-win);
    white-space: nowrap; grid-template-columns: auto auto auto; width: auto;
  }
  .wildos-demo .wdos-navitem[data-on="1"] { background: var(--wd-ink); border-color: var(--wd-ink); color: #fff; }
  .wdos-navitem[data-on="1"] svg { color: #fff; }
  .wdos-navitem[data-on="1"] .wdos-count { color: rgba(255, 255, 255, .72); }

  .wdos-main { grid-row: 2; grid-column: 1; }
  .wdos-view { position: relative; inset: auto; }
  .wdos-view:not(.is-on) { display: none; }
  .wdos-doc { padding: 18px 16px 24px; }
  .wdos-tab { max-width: 150px; }

  .wdos-insp {
    grid-row: 3; grid-column: 1;
    border-left: 0; border-top: 1px solid var(--wd-line-2);
    max-height: none;
  }
  .wildos-demo .wdos-insp-t { width: 100%; height: 40px; cursor: pointer; }
  .wdos-insp-t::after {
    content: ''; width: 8px; height: 8px; flex: none;
    border-right: 1.5px solid var(--wd-faint); border-bottom: 1.5px solid var(--wd-faint);
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform .22s var(--wd-ease);
  }
  .wildos-demo[data-ctxopen="1"] .wdos-insp-t::after { transform: rotate(225deg) translate(-3px, -3px); }
  .wildos-demo:not([data-ctxopen="1"]) .wdos-ctx,
  .wildos-demo:not([data-ctxopen="1"]) .wdos-next { display: none; }
  .wdos-ctx { max-height: 260px; }

  /* 已完成步骤折叠：只留标题行 */
  .wildos-demo .wdos-fold { display: flex; }
  .wdos-stream[data-fold="1"] .wdos-step[data-s="done"] .wdos-io,
  .wdos-stream[data-fold="1"] .wdos-step[data-s="fail"] .wdos-io { display: none; }
  .wdos-stream[data-fold="1"] .wdos-step[data-s="done"],
  .wdos-stream[data-fold="1"] .wdos-step[data-s="fail"] { padding: 7px 0 8px; }
  .wdos-stream[data-fold="1"] .wdos-step[data-s="done"] .wdos-step-n,
  .wdos-stream[data-fold="1"] .wdos-step[data-s="fail"] .wdos-step-n { font-size: 12.5px; color: var(--wd-dim); }
  .wdos-stream[data-fold="1"] .wdos-note { display: none; }

  .wdos-step { grid-template-columns: 18px minmax(0, 1fr); row-gap: 4px; }
  .wdos-state { grid-column: 2; padding-top: 0; }
  .wdos-note { grid-column: 1 / -1; }

  .wdos-ask-f { grid-template-columns: minmax(0, 1fr); row-gap: 12px; }
  .wildos-demo .wdos-go { width: 100%; justify-content: center; height: 44px; }
  .wdos-opt-f { grid-template-columns: minmax(0, 1fr); gap: 4px; margin-top: 7px; }
  .wdos-opt-f span { display: grid; grid-template-columns: 38px minmax(0, 1fr); column-gap: 9px; align-items: baseline; }
  .wdos-opt-f b { display: block; margin: 0; }
  .wdos-ask-b { padding: 12px 12px 13px; }
  .wdos-ask-why { font-size: 12.5px; line-height: 1.7; margin-bottom: 11px; }
  .wdos-opt { padding: 10px 11px 11px; }
  .wdos-hint { font-size: 12px; }

  .wildos-demo .wdos-row { grid-template-columns: 22px minmax(0, 1fr); row-gap: 5px; }
  .wdos-fm { grid-column: 2; text-align: left; }
  .wdos-fm b { display: inline; }
  .wdos-fm b::after { content: ' · '; color: var(--wd-ghost); }

  .wdos-kb { grid-template-columns: minmax(0, 1fr); row-gap: 9px; }
  .wdos-ready { grid-template-columns: auto minmax(0, 1fr); row-gap: 10px; }
  .wildos-demo .wdos-ready .wdos-go { grid-column: 1 / -1; height: 40px; }

  .wdos-status { height: auto; padding: 8px 11px; grid-template-columns: minmax(0, 1fr); row-gap: 6px; }
  .wdos-st-r { flex-wrap: wrap; gap: 9px; }

  .wdos-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wildos-demo .wdos-sbtn { padding: 11px 10px 9px 0; }
  .wildos-demo .wdos-sbtn:nth-child(2n) { padding-left: 10px; }
  .wildos-demo .wdos-sbtn:nth-child(n + 3)::after {
    content: ''; position: absolute; top: -1px; left: 0; right: 0; height: 1px; background: var(--wd-line);
  }
  .wdos-ctrls .wdos-btn { flex: 1 1 auto; justify-content: center; height: 44px; }
  .wdos-fine { flex-direction: column; align-items: flex-start; gap: 5px; }
}

/* ==========================================================================
   减少动画偏好
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .wildos-demo :where(*, *::before, *::after) {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    transition-delay: 0ms !important;
    scroll-behavior: auto !important;
  }
  .wdos-mark { background-size: 100% 100% !important; }
  .wdos-sbtn[data-s="done"]::before, .wdos-sbtn[data-s="active"]::before { transform: scaleX(1) !important; }
}
