/* 新建视频项目 · 向导页 · 从 public/exact/projects-new.html 内联 <style> 忠实移植。
   整段 scope 进 .project-wizard-page,避免污染同文件的 ProjectsPage(.projects-page)。
   token + 共享组件(.btn/.field/.input/.textarea/.select/.placeholder/.pp-chip/.pp-menu .mi)走全局 design-restraint;
   此处只覆盖向导专属:.wizard 网格 / .steps 步骤轨 / .pp- 商品选择器 / .opt-card / .source-card / .wiz-start-bar。 */
.project-wizard-page {
  /* ── 两栏栅格:左 sticky 步骤轨 + 右主体 ── */
  .wizard { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 36px; align-items: start; max-width: 1400px; }

  .steps {
    position: sticky;
    top: calc(64px + 24px);
    align-self: start;
    max-height: calc(100vh - 64px - 48px);
    overflow-y: auto;
    z-index: 2;
  }

  /* ── 单页式主体:Step 1 + Step 2 同时显示,底部「开始」CTA ── */
  .wiz-body { display: flex; flex-direction: column; gap: 14px; }
  .step-pane-wrap { display: block; }

  /* ── 左侧步骤轨 .step ── */
  .step { display: flex; gap: 12px; padding: 12px 0; position: relative; }
  .step:not(:last-child)::after { content: ''; position: absolute; left: 11px; top: 36px; width: 1px; height: calc(100% - 24px); background: var(--border-faint); }
  .step .num { width: 24px; height: 24px; border: 1px solid var(--border-faint); border-radius: var(--r-sm); background: var(--surface); display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--black-alpha-48); flex-shrink: 0; z-index: 1; font-family: var(--font-mono); }
  .step .num svg { width: 12px; height: 12px; }
  .step.done .num { background: var(--accent-black); border-color: var(--accent-black); color: var(--accent-white); }
  .step.active .num { background: var(--heat); border-color: var(--heat); color: var(--accent-white); }
  .step .label { font-size: 13.5px; font-weight: 500; color: var(--black-alpha-56); padding-top: 2px; }
  .step .desc { font-size: 11.5px; color: var(--black-alpha-48); padding-top: 3px; line-height: 1.4; font-family: var(--font-mono); letter-spacing: .02em; }
  .step.active .label { color: var(--accent-black); font-weight: 600; }
  .step.done .label { color: var(--black-alpha-56); }
  .step.done:not(:last-child)::after { background: var(--accent-black); }
  .step.clickable { cursor: pointer; }
  .step.clickable:hover .label { color: var(--heat); }
  .step.clickable:hover .num { border-color: var(--heat); }

  /* ── 主体卡片 .wiz-pane ── */
  .wiz-pane { background: var(--surface); border: 1px solid var(--border-faint); border-radius: var(--r-md); padding: 22px 24px; margin-bottom: 14px; }
  .wiz-pane:last-child { margin-bottom: 0; }
  .wiz-step-h { margin-bottom: 18px; }
  .wiz-step-h h2 { font-size: 20px; font-weight: 600; letter-spacing: -.015em; }
  .wiz-step-h p { font-size: 13px; color: var(--black-alpha-56); margin-top: 6px; line-height: 1.6; }

  /* ── Step 1 · 商品选择器 toolbar(沿用商品库视觉,.pp- 命名空间)── */
  .pp-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
  .pp-toolbar .search-inline {
    flex: 1; min-width: 220px; max-width: 340px;
    display: inline-flex; align-items: center; gap: 8px;
    height: 34px; padding: 0 12px;
    background: var(--surface);
    border: 1px solid var(--border-faint);
    border-radius: var(--r-md);
    transition: border-color var(--t-base);
  }
  .pp-toolbar .search-inline:focus-within { border-color: var(--heat-40); }
  .pp-toolbar .search-inline svg { width: 14px; height: 14px; color: var(--black-alpha-48); flex-shrink: 0; }
  .pp-toolbar .search-inline input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font-size: 13px; color: var(--accent-black); font-family: inherit; }
  .pp-toolbar .search-inline input::placeholder { color: var(--black-alpha-48); }
  .pp-toolbar .pp-chip-wrap { position: relative; }
  .pp-toolbar .pp-chip {
    display: inline-flex; align-items: center; gap: 6px;
    height: 34px; padding: 0 12px;
    background: var(--surface);
    border: 1px solid var(--border-faint);
    border-radius: var(--r-md);
    font-size: 13px; font-family: inherit;
    color: var(--black-alpha-72);
    cursor: pointer;
    transition: border-color var(--t-base), color var(--t-base);
  }
  .pp-toolbar .pp-chip:hover { border-color: var(--black-alpha-32); color: var(--accent-black); }
  .pp-toolbar .pp-chip.active { background: var(--heat-12); color: var(--heat); border-color: var(--heat-20); }
  .pp-toolbar .pp-chip svg { width: 11px; height: 11px; opacity: .6; }
  .pp-toolbar .pp-menu {
    position: absolute; top: calc(100% + 4px); left: 0;
    min-width: 160px;
    background: var(--surface);
    border: 1px solid var(--border-faint);
    border-radius: var(--r-md);
    box-shadow: var(--shadow-floating);
    padding: 4px;
    display: none;
    z-index: 20;
  }
  .pp-toolbar .pp-chip-wrap.open .pp-menu { display: block; }
  .pp-toolbar .pp-menu .mi {
    display: flex; align-items: center; gap: 6px;
    padding: 7px 10px;
    border-radius: var(--r-sm);
    font-size: 12.5px;
    color: var(--accent-black);
    cursor: pointer;
  }
  .pp-toolbar .pp-menu .mi:hover { background: var(--background-lighter); }
  .pp-toolbar .pp-menu .mi.selected { color: var(--heat); font-weight: 600; }
  .pp-toolbar .pp-menu .mi-check { width: 12px; height: 12px; opacity: 0; flex-shrink: 0; }
  .pp-toolbar .pp-menu .mi.selected .mi-check { opacity: 1; }
  .pp-toolbar .pp-clear {
    display: inline-flex; align-items: center; gap: 4px;
    height: 30px; padding: 0 10px;
    background: transparent; border: 0; border-radius: var(--r-sm);
    color: var(--black-alpha-56); font-size: 12.5px; font-family: inherit;
    cursor: pointer;
  }
  .pp-toolbar .pp-clear:hover { color: var(--accent-crimson); background: var(--crimson-bg); }
  .pp-toolbar .pp-clear svg { width: 11px; height: 11px; }

  .pp-result-meta {
    font-family: var(--font-mono); font-size: 11.5px;
    color: var(--black-alpha-48); letter-spacing: .02em;
    margin: 4px 0 12px;
  }

  /* ── Step 1 · 商品网格(固定 4 列,沿用 .product-card 视觉)── */
  .pp-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
  .pp-grid .product-card {
    background: var(--surface);
    border: 1px solid var(--border-faint);
    border-radius: var(--r-md);
    cursor: pointer; position: relative; overflow: hidden;
    display: flex; flex-direction: column;
    transition: background .15s, border-color .15s, transform .15s;
  }
  .pp-grid .product-card:hover { background: var(--background-lighter); border-color: var(--black-alpha-48); }
  .pp-grid .product-card.selected { border-color: var(--heat); background: var(--heat-12); }
  .pp-grid .product-card.selected::after {
    content: ''; position: absolute; top: 0; right: 0;
    width: 0; height: 0;
    border-top: 28px solid var(--heat);
    border-left: 28px solid transparent;
    z-index: 2;
  }
  .pp-grid .product-card.selected::before {
    content: ''; position: absolute; top: 4px; right: 4px;
    width: 10px; height: 10px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23ffffff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='3 8 7 12 13 4'/%3E%3C/svg%3E") no-repeat center / contain;
    z-index: 3;
  }
  .pp-grid .product-thumb { aspect-ratio: 1.4 / 1; }
  .pp-grid .product-body { padding: 14px 14px 12px; flex: 1; }
  .pp-grid .product-name {
    font-size: 14px; font-weight: 600; color: var(--accent-black);
    line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  }
  .pp-grid .product-cat {
    display: inline-flex; align-items: center;
    margin-top: 8px; padding: 2px 8px;
    background: var(--background-lighter); color: var(--black-alpha-72);
    border-radius: var(--r-sm); font-size: 11.5px;
  }
  .pp-grid .product-date {
    font-family: var(--font-mono);
    font-size: 11px; color: var(--black-alpha-48);
    margin-top: 10px; letter-spacing: .02em;
  }
  .pp-grid .product-card.selected .product-cat { background: var(--surface); color: var(--heat); }

  /* ── Step 1 · 创建新商品 空卡 ── */
  .pp-grid .pp-create-card {
    border: 1.5px dashed var(--black-alpha-24);
    border-radius: var(--r-md);
    background: transparent;
    cursor: pointer;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 10px; min-height: 220px;
    color: var(--black-alpha-48);
    font-family: inherit;
    transition: border-color var(--t-base), color var(--t-base), background var(--t-base);
  }
  .pp-grid .pp-create-card:hover { border-color: var(--heat); color: var(--heat); background: var(--heat-12); }
  .pp-grid .pp-create-card .pc-plus {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--heat); color: var(--accent-white);
    display: grid; place-items: center;
    transition: filter var(--t-base);
  }
  .pp-grid .pp-create-card:hover .pc-plus { filter: brightness(1.06); }
  .pp-grid .pp-create-card .pc-plus svg { width: 18px; height: 18px; }
  .pp-grid .pp-create-card .pc-t { font-size: 13px; font-weight: 600; }
  .pp-grid .pp-create-card .pc-d { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .02em; }

  /* ── Step 1 · 列表视图 ── */
  .pp-grid.list-view { display: flex; flex-direction: column; gap: 6px; }
  .pp-grid.list-view .product-card { flex-direction: row; align-items: center; }
  .pp-grid.list-view .product-thumb { width: 96px; aspect-ratio: 1.4 / 1; flex-shrink: 0; }
  .pp-grid.list-view .product-body { flex: 1; padding: 10px 14px; }
  .pp-grid.list-view .pp-create-card { flex-direction: row; min-height: 56px; gap: 12px; }
  .pp-grid.list-view .pp-create-card .pc-plus { width: 32px; height: 32px; }

  /* ── Step 1 · 空筛选结果 ── */
  .pp-empty {
    grid-column: 1 / -1;
    padding: 48px 24px; text-align: center;
    border: 1px dashed var(--border-faint);
    border-radius: var(--r-md);
    background: var(--background-lighter);
    color: var(--black-alpha-48);
    font-size: 12.5px; font-family: var(--font-mono); letter-spacing: .02em;
    line-height: 1.7;
  }
  .pp-empty .reset { display: inline-block; margin-top: 8px; color: var(--heat); cursor: pointer; }

  /* ── Step 1 · 分页 ── */
  .pp-pager {
    display: flex; align-items: center; gap: 16px;
    margin-top: 18px; padding-top: 14px;
    border-top: 1px solid var(--border-faint);
    font-size: 12.5px; color: var(--black-alpha-56);
  }
  .pp-pager .total { font-family: var(--font-mono); letter-spacing: .02em; }
  .pp-pager .pages { display: inline-flex; gap: 4px; margin-left: auto; }
  .pp-pager .pages button {
    min-width: 28px; height: 28px; padding: 0 8px;
    border: 1px solid var(--border-faint); background: var(--surface);
    border-radius: var(--r-sm);
    cursor: pointer; font-size: 12.5px; color: var(--black-alpha-72); font-family: inherit;
    transition: border-color var(--t-base), background var(--t-base), color var(--t-base);
  }
  .pp-pager .pages button:hover:not(.active):not(:disabled) { border-color: var(--black-alpha-32); color: var(--accent-black); }
  .pp-pager .pages button.active { background: var(--heat); color: var(--accent-white); border-color: var(--heat); font-weight: 600; }
  .pp-pager .pages button:disabled { opacity: .4; cursor: not-allowed; }
  .pp-pager .pages .ellipsis {
    min-width: 22px; height: 28px;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--black-alpha-48); font-family: var(--font-mono);
  }
  .pp-pager .page-size {
    display: inline-flex; align-items: center; gap: 4px;
    height: 28px; padding: 0 10px;
    background: var(--surface); border: 1px solid var(--border-faint);
    border-radius: var(--r-sm);
    font-family: inherit; font-size: 12.5px; color: var(--black-alpha-72);
  }

  /* ── Step 1 · 底部提示 ── */
  .pp-bottom-tip {
    margin-top: 14px;
    padding: 10px 14px;
    background: var(--background-lighter);
    border: 1px solid var(--border-faint);
    border-radius: var(--r-md);
    font-size: 12.5px; color: var(--black-alpha-56);
    display: flex; align-items: center; gap: 8px;
  }
  .pp-bottom-tip svg { width: 14px; height: 14px; flex-shrink: 0; color: var(--black-alpha-48); }
  .pp-bottom-tip a { color: var(--heat); cursor: pointer; text-decoration: none; }
  .pp-bottom-tip a:hover { text-decoration: underline; }

  /* ── Step 2 · 配置字段(共享 .field/.input/.select 走全局)── */
  .config-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-items: start; margin-bottom: 16px; }
  .config-row .field { margin-bottom: 0; }
  .duration-select { cursor: pointer; }

  /* ── Step 2 · 选项卡 .opt-card ── */
  .opt-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .opt-row.cols-4 { grid-template-columns: repeat(4, 1fr); }
  .opt-row.cols-6 { grid-template-columns: repeat(3, 1fr); }
  .opt-card { border: 1px solid var(--border-faint); border-radius: var(--r-md); padding: 14px; background: var(--surface); cursor: pointer; position: relative; display: flex; flex-direction: column; min-width: 0; transition: background var(--t-base), border-color var(--t-base); }
  .opt-card:hover { background: var(--background-lighter); }
  .opt-card.selected { border-color: var(--heat); background: var(--heat-12); }
  .opt-card.selected::after { content: ''; position: absolute; top: 8px; right: 10px; width: 16px; height: 16px; background-color: var(--heat); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: center; background-size: 10px 10px; border-radius: var(--r-sm); }
  .opt-card h4 { font-size: 13px; font-weight: 600; }
  .opt-card .sub { font-family: var(--font-mono); font-size: 10.5px; color: var(--black-alpha-48); margin-top: 3px; letter-spacing: .02em; }
  .opt-card .note { font-size: 11.5px; color: var(--black-alpha-56); margin-top: 6px; line-height: 1.5; }
  .opt-card .metric { margin-top: auto; padding-top: 10px; font-family: var(--font-mono); font-size: 10.5px; color: var(--black-alpha-48); letter-spacing: .02em; }
  .opt-card .metric .val { color: var(--accent-black); font-weight: 500; }
  .opt-card.selected .metric .val { color: var(--heat); }
  .opt-card .badge { font-family: var(--font-mono); font-size: 9.5px; padding: 1px 6px; background: var(--surface); border: 1px solid var(--border-faint); border-radius: var(--r-sm); color: var(--black-alpha-48); display: inline-block; margin-top: 8px; letter-spacing: .04em; align-self: flex-start; }
  .opt-card.selected .badge { color: var(--heat); border-color: var(--heat-20); }

  @media (min-width: 1280px) { .opt-row.cols-6 { grid-template-columns: repeat(6, 1fr); } }

  /* ── Step 2 · 卖点胶囊 .theme-pill ── */
  .theme-pill-row { display: flex; gap: 8px; flex-wrap: wrap; }
  .theme-pill { display: inline-flex; gap: 6px; align-items: center; height: 36px; padding: 0 16px; border: 1px solid var(--border-faint); border-radius: 999px; background: var(--surface); font-size: 13px; font-weight: 500; font-family: inherit; cursor: pointer; color: var(--accent-black); transition: background var(--t-base), border-color var(--t-base), color var(--t-base); }
  .theme-pill:hover { background: var(--background-lighter); }
  .theme-pill.active { background: var(--heat-12); color: var(--heat); border-color: var(--heat); font-weight: 600; }
  .theme-pill svg { width: 13px; height: 13px; }

  /* ── Step 2 · 人设推荐气泡 .reco-bubble ── */
  .reco-bubble { position: relative; margin-top: 10px; padding: 10px 14px; background: var(--heat-12); border: 1px solid var(--heat-20); border-radius: var(--r-md); display: flex; align-items: center; gap: 12px; font-size: 12.5px; color: var(--accent-black); }
  .reco-bubble::before { content: ''; position: absolute; top: -5px; left: 28px; width: 9px; height: 9px; background: var(--heat-12); border-left: 1px solid var(--heat-20); border-top: 1px solid var(--heat-20); transform: rotate(45deg); }
  .reco-bubble .ic { color: var(--heat); flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; }
  .reco-bubble .ic svg, .reco-bubble .dismiss svg { display: block; width: 16px; height: 16px; }
  .reco-bubble .txt { flex: 1; line-height: 1.5; }
  .reco-bubble .txt strong { color: var(--heat); font-weight: 600; }
  .reco-bubble .txt .meta { display: block; font-family: var(--font-mono); font-size: 10.5px; color: var(--black-alpha-48); margin-top: 2px; letter-spacing: .02em; }
  .reco-bubble .btn-apply { height: 28px; padding: 0 12px; background: var(--heat); color: var(--accent-white); border: 1px solid var(--heat); border-radius: var(--r-md); font-size: 12px; font-weight: 600; cursor: pointer; flex-shrink: 0; box-shadow: var(--shadow-cta); transition: box-shadow var(--t-base); font-family: inherit; }
  .reco-bubble .btn-apply:hover { box-shadow: var(--shadow-cta-hover); }
  .reco-bubble .dismiss { background: transparent; color: var(--black-alpha-48); border: 0; width: 24px; height: 24px; padding: 0; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
  .reco-bubble .dismiss:hover { color: var(--accent-black); }

  /* ── 底部「开始」CTA ── */
  .wiz-start-bar { display: flex; justify-content: flex-end; padding: 20px 0 8px; }
  .wiz-start-bar .btn-start { height: 44px; padding: 0 36px; background: var(--heat); color: var(--accent-white); border: 1px solid var(--heat); border-radius: 999px; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow-cta); display: inline-flex; align-items: center; gap: 8px; font-family: inherit; transition: box-shadow var(--t-base), opacity var(--t-base); }
  .wiz-start-bar .btn-start:hover:not(.disabled) { box-shadow: var(--shadow-cta-hover); }
  .wiz-start-bar .btn-start.disabled { opacity: .4; cursor: not-allowed; }
  .wiz-start-bar .btn-start svg { width: 14px; height: 14px; }

  /* ── 响应式:窄屏单列 ── */
  @media (max-width: 1100px) {
    .pp-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  }
  @media (max-width: 900px) {
    .config-row { grid-template-columns: 1fr; }
  }
  @media (max-width: 800px) {
    .pp-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  }
}
