:root {
  --launcher-card-radius: 16px;
  --launcher-card-border: #dce3dd;
  --launcher-card-shadow: 0 14px 38px rgba(28, 42, 32, .06);
  --launcher-stage-gap: 18px;
}

.launcher-shell {
  width: min(1380px, calc(100% - 64px));
  margin-inline: auto;
  padding: 28px 0 96px;
}
.launcher-shell h1,.launcher-shell h2,.launcher-shell h3{font-family:Inter,"Noto Sans SC","PingFang SC","Microsoft YaHei",system-ui,sans-serif;font-weight:850;letter-spacing:-.02em}

.launcher-shell [id] { scroll-margin-top: 94px; }

.page-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(420px, .72fr);
  align-items: end;
  gap: 28px;
  min-height: 164px;
  padding: 30px 34px;
  border: 1px solid var(--launcher-card-border);
  border-radius: 20px;
  background: linear-gradient(135deg, #fff 0%, #f8fbf8 58%, #eef6f0 100%);
  box-shadow: var(--launcher-card-shadow);
}

.page-heading-copy { min-width: 0; }
.page-heading h1 { margin: 0; font-size: clamp(34px, 3.1vw, 50px); letter-spacing: -.02em; }
.page-heading-copy > p:last-child { max-width: 700px; margin: 10px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }

.launcher-step-nav {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  align-self: stretch;
}

.launcher-step-link {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 5px;
  padding: 14px;
  border: 1px solid rgba(22, 122, 69, .16);
  border-radius: 12px;
  background: rgba(255, 255, 255, .72);
  color: #344038;
  text-decoration: none;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.launcher-step-link:hover { border-color: rgba(22, 122, 69, .42); background: #fff; transform: translateY(-1px); }
.launcher-step-link[aria-current="step"] { border-color: #177446; background: #edf7f1; color: #12683c; }
.launcher-step-link > span { color: var(--accent-strong); font-size: 9px; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.launcher-step-link > strong { overflow: hidden; font-size: 11px; line-height: 1.3; text-overflow: ellipsis; }
.launcher-step-link > small { color: #6f796f; font-size: 9px; line-height: 1.4; }

.workspace-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 390px;
  gap: 22px;
  align-items: start;
  margin-top: 22px;
}

.workspace-main { min-width: 0; display: grid; gap: var(--launcher-stage-gap); }
.workspace-side { min-width: 0; position: sticky; top: 82px; }

.workspace-stage {
  min-width: 0;
  overflow: clip;
  border: 1px solid var(--launcher-card-border);
  border-radius: var(--launcher-card-radius);
  background: #fff;
  box-shadow: 0 8px 24px rgba(29, 42, 33, .035);
}

.stage-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid #e5eae6;
  background: linear-gradient(180deg, #fbfdfb 0%, #f7faf8 100%);
}
.stage-heading-copy { min-width: 0; }
.stage-heading h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.stage-heading p { max-width: 760px; margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.stage-number {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
}

.mode-picker,
.style-direction,
.platform-section,
.color-theme-section,
.launcher-grid {
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}

.mode-picker { padding: 22px 24px; border-bottom: 1px solid #e5eae6; }
.mode-picker-heading { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.mode-picker-heading h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.mode-picker-heading p { margin: 5px 0 0; color: var(--muted); font-size: 10px; }

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
}
.mode-tabs > button {
  position: relative;
  min-height: 76px;
  padding: 14px 14px 12px;
  border: 1px solid #dfe4df;
  border-radius: 10px;
  background: #f8faf8;
  color: #273029;
  text-align: left;
  transition: .18s ease;
}
.mode-tabs > button:hover { border-color: #aeb8b0; background: #fff; transform: translateY(-1px); }
.mode-tabs > button[aria-selected="true"], .mode-tabs > button.is-active {
  border-color: #136e3e;
  background: #146f3f;
  color: #fff;
  box-shadow: 0 8px 20px rgba(20, 111, 63, .18);
  transform: translateY(-2px);
}
.mode-tabs > button[aria-selected="true"]::after, .mode-tabs > button.is-active::after {
  position: absolute;
  right: 12px;
  top: 10px;
  content: "✓";
  font-weight: 900;
}
.mode-tabs strong { display: block; font-size: 12px; }
.mode-tabs small { display: block; margin-top: 6px; color: #667068; font-size: 9px; line-height: 1.4; }
.mode-tabs > button[aria-selected="true"] small, .mode-tabs > button.is-active small { color: rgba(255, 255, 255, .82); }

.launcher-grid { display: block; padding: 0; overflow: visible; }
.requirement-stage { padding: 18px 24px 0; background: #fff; }
.requirement-stage .flow-label { display: none; }
.requirement-stage h2 { margin: 0; font-size: 16px; letter-spacing: -.02em; }
.requirement-stage p { max-width: 720px; margin: 5px 0 0; color: var(--muted); font-size: 10px; line-height: 1.6; }
.intent-form { padding: 0; background: #fff; }
.intent-form > .config-section:first-child { margin: 0; padding: 20px 24px 24px; background: #fff; }
.intent-form > .config-section:first-child .section-heading h2 { font-size: 18px; letter-spacing: -.02em; }
.intent-form > .config-section:first-child .section-heading p { font-size: 11px; }
.intent-form > .config-section:first-child .text-field > span { font-weight: 800; }
.intent-form > .config-section:first-child input,
.intent-form > .config-section:first-child textarea { min-height: 46px; border-color: #b8c3ba; background: #fff; font-size: 13px; }
.intent-form > .config-section:first-child textarea { min-height: 110px; }
.intent-form > .config-section:not(:first-child) { padding: 20px 24px; border-top: 1px solid #e7ebe8; }

.brief-seed-row { align-items: end; }
.brief-seed-row .text-field { flex: 1; }
.brief-seed-row input { font-size: 14px !important; font-weight: 650; }
.structured-brief { margin-top: 14px; padding: 16px; border: 1px solid #d9e3db; border-radius: 10px; background: #f8fbf8; }
.structured-brief::before { display: block; margin-bottom: 12px; color: #146f3f; content: "把需求补完整"; font-size: 10px; font-weight: 850; letter-spacing: .06em; }

.design-decisions-body { display: grid; }
.design-decisions-body > section + section { border-top: 1px solid #e5eae6; }
.style-direction, .platform-section, .color-theme-section { padding: 22px 24px 24px; }
.section-heading, .mode-picker-heading { margin-bottom: 14px; }
.section-heading h2 { font-size: 16px; letter-spacing: -.02em; }
.section-heading p { font-size: 10px; }
.flow-label { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 8px; color: var(--accent-strong); font-size: 9px; font-weight: 850; letter-spacing: .05em; text-transform: uppercase; }
.flow-label span { display: grid; width: 22px; height: 22px; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--accent-strong); font-size: 9px; }

.style-card-grid { display: flex; gap: 9px; align-items: stretch; counter-reset: visual-direction; }
.style-card-grid > :is(label, button), .style-card { flex: 1 1 0; min-width: 0; min-height: 184px; border-radius: 11px; transition: flex .18s ease, border-color .18s ease, background .18s ease, transform .18s ease; counter-increment: visual-direction; }
.style-card-grid > :is(label, button)::before, .style-card::before { position: absolute; z-index: 3; top: 12px; left: 12px; display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(255,255,255,.82); border-radius: 999px; background: rgba(20,26,21,.78); color: #fff; content: counter(visual-direction, decimal-leading-zero); font-size: 9px; font-weight: 850; letter-spacing: .04em; box-shadow: 0 3px 10px rgba(0,0,0,.12); pointer-events: none; }
.style-card-grid > :is(label, button):hover, .style-card:hover { transform: translateY(-2px); }
.style-card-grid > :is(label, button):is(:has(input:checked), [aria-checked="true"], [aria-pressed="true"], .is-selected), .style-card:is(:has(input:checked), [aria-checked="true"], [aria-pressed="true"], .is-selected) { flex: 1.65 1 0; background: #f2f9f4; }
.style-card-grid > :is(label, button):is(:has(input:checked), [aria-checked="true"], [aria-pressed="true"], .is-selected)::before, .style-card:is(:has(input:checked), [aria-checked="true"], [aria-pressed="true"], .is-selected)::before { background: var(--accent); }

.platform-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 9px; }
.platform-card { position: relative; display: flex; align-items: center; gap: 12px; min-height: 76px; padding: 12px 14px; border: 1px solid #dfe5e0; border-radius: 11px; background: #fafbfa; color: #253028; cursor: pointer; text-align: left; transition: .16s ease; }
.platform-card:hover { border-color: #aeb9b0; background: #fff; transform: translateY(-1px); }
.platform-card.is-active, .platform-card[aria-checked="true"] { border-color: #147043; background: #f0f8f3; box-shadow: 0 0 0 1px #147043 inset; }
.platform-card.is-active::after, .platform-card[aria-checked="true"]::after { position: absolute; right: 9px; bottom: 9px; display: grid; width: 18px; height: 18px; place-items: center; border-radius: 50%; background: #147043; color: #fff; content: "✓"; font-size: 10px; font-weight: 900; }
.platform-icon { display: grid; width: 46px; height: 46px; flex: 0 0 46px; place-items: center; border: 1px solid #e1e6e2; border-radius: 12px; background: #fff; color: #202722; }
.platform-icon svg { width: 28px; height: 28px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.platform-copy strong { display: block; font-size: 12px; }
.platform-copy small { display: block; margin-top: 4px; color: #69736b; font-size: 9px; line-height: 1.35; }
.platform-hint { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; padding: 10px 12px; border: 1px solid #e4e9e5; border-radius: 9px; background: #f5f8f6; color: #59645c; font-size: 9px; }
.platform-hint b { color: #2f503b; }
.platform-hint > span:last-child { white-space: nowrap; color: #176b41; font-weight: 800; }

.color-theme-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.color-theme-card { min-height: 84px; grid-template-rows: 1fr; border-radius: 10px; background: var(--theme-canvas, #fafbfa); color: var(--theme-ink, #202721); border-color: var(--theme-border, #dfe5e0); }
.color-theme-choice { grid-template-columns: 54px minmax(0, 1fr); gap: 10px; padding: 11px 30px 11px 10px; }
.color-theme-palette { width: 54px; height: 44px; border-radius: 6px; }
.color-theme-copy { gap: 3px; }
.color-theme-copy strong { font-size: 11px; }
.color-theme-copy small { max-height: 32px; overflow: hidden; font-size: 9px; line-height: 1.4; }
.color-theme-meta, .color-theme-source { display: none; }
.color-theme-check { right: 8px; bottom: 8px; width: 18px; height: 18px; }

.design-system-workbench { margin-top: 18px; padding-top: 18px; border-top: 1px solid #e5eae6; }
.ds-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 12px; }
.ds-toolbar strong { font-size: 13px; }
.ds-toolbar span { color: #636e65; font-size: 10px; }
.ds-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.ds-tab { border: 1px solid #dce3dd; border-radius: 999px; background: #f7faf8; padding: 7px 11px; color: #344038; font-size: 10px; font-weight: 800; cursor: pointer; }
.ds-tab.is-active, .ds-tab[aria-selected="true"] { border-color: #177446; background: #e9f5ed; color: #12683c; }
.ds-panel { display: none; }
.ds-panel.is-active { display: block; }
.ds-foundation-grid { display: grid; grid-template-columns: 1.05fr 1fr 1fr; gap: 10px; }
.ds-info-card { min-height: 132px; padding: 14px; border: 1px solid #e0e5e1; border-radius: 11px; background: #fbfcfb; }
.ds-info-card h3 { margin: 0 0 10px; font-size: 11px; }
.ds-info-card p { margin: 0; color: #59645c; font-size: 9px; line-height: 1.55; }
.ds-token-row { display: flex; gap: 6px; margin: 10px 0; }
.ds-swatch { width: 28px; height: 28px; border: 1px solid rgba(0,0,0,.08); border-radius: 8px; background: var(--swatch, #1677ff); }
.ds-type-sample { margin-top: 8px; }
.ds-type-sample strong { display: block; font-size: 19px; line-height: 1.1; }
.ds-type-sample small { font-size: 9px; color: #68736b; }
.ds-metric-list { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.ds-metric { padding: 8px; border-radius: 8px; background: #f0f4f1; }
.ds-metric b { display: block; font-size: 10px; }
.ds-metric span { font-size: 8px; color: #69736b; }

.component-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.component-demo { min-height: 108px; padding: 12px; border: 1px solid #e0e5e1; border-radius: 10px; background: #fbfcfb; }
.component-demo > span { display: block; margin-bottom: 10px; color: #626c64; font-size: 8px; font-weight: 850; text-transform: uppercase; letter-spacing: .05em; }
.demo-button { display: inline-flex; align-items: center; justify-content: center; min-height: 32px; padding: 0 14px; border: 0; border-radius: 8px; background: #1677ff; color: #fff; font-size: 10px; font-weight: 800; }
.demo-input { height: 34px; border: 1px solid #d4d9d5; border-radius: 8px; background: #fff; padding: 0 10px; color: #667068; font-size: 9px; display: flex; align-items: center; }
.demo-segmented { display: grid; grid-template-columns: 1fr 1fr 1fr; padding: 3px; border-radius: 8px; background: #eef1ef; }
.demo-segmented i { padding: 6px 5px; border-radius: 6px; font-style: normal; text-align: center; font-size: 8px; }
.demo-segmented i:first-child { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.09); }
.demo-list { overflow: hidden; border: 1px solid #e0e4e1; border-radius: 8px; background: #fff; }
.demo-list div { display: flex; justify-content: space-between; padding: 8px 9px; border-bottom: 1px solid #eef1ef; font-size: 8px; }
.demo-list div:last-child { border-bottom: 0; }
.ds-rule-note { margin-top: 10px; padding: 10px 12px; border-radius: 9px; background: #f1f7f3; color: #335b42; font-size: 9px; line-height: 1.55; }
.ds-rule-note b { color: #155f38; }

.preview-controls { display: flex; gap: 6px; margin-bottom: 10px; }
.preview-control { border: 1px solid #dce3dd; border-radius: 7px; background: #fff; padding: 6px 9px; color: #344038; font-size: 9px; font-weight: 750; cursor: pointer; }
.preview-control.is-active, .preview-control[aria-pressed="true"] { border-color: #1c7548; background: #edf6f0; color: #176d42; }
.ds-preview-shell { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; min-height: 260px; padding: 12px; border: 1px solid #dfe5e0; border-radius: 12px; background: #f3f6f4; }
.preview-meta { padding: 12px; border-radius: 9px; background: #fff; }
.preview-meta strong { display: block; font-size: 12px; }
.preview-meta p { margin: 6px 0 12px; color: #616c63; font-size: 9px; line-height: 1.5; }
.preview-meta ul { margin: 0; padding-left: 15px; color: #59645c; font-size: 8px; line-height: 1.8; }
.preview-canvas { display: flex; align-items: center; justify-content: center; overflow: auto; border-radius: 9px; background: #e7ece8; }
.preview-device { --preview-accent: #1677ff; width: 246px; min-height: 420px; padding: 16px; border: 1px solid #cfd6d0; border-radius: 24px; background: #fff; box-shadow: 0 14px 34px rgba(32,43,35,.12); transition: .2s ease; }
.preview-device[data-size="tablet"] { width: 390px; border-radius: 18px; }
.preview-device[data-size="desktop"] { width: 100%; min-height: 300px; border-radius: 12px; }
.preview-device[data-platform="android"] { border-radius: 18px; }
.preview-device[data-platform="windows"], .preview-device[data-platform="macos"] { width: 100%; min-height: 300px; border-radius: 12px; }
.preview-status { display: flex; justify-content: space-between; font-size: 8px; font-weight: 800; }
.preview-nav { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 14px; }
.preview-nav strong { font-size: 18px; }
.preview-avatar { width: 28px; height: 28px; border-radius: 50%; background: #edf0ee; }
.preview-card { padding: 14px; border: 1px solid #e2e6e3; border-radius: 14px; background: #fafbfa; }
.preview-card small { color: #68736b; font-size: 8px; }
.preview-card h4 { margin: 5px 0 12px; font-size: 14px; }
.preview-card-row { display: flex; gap: 8px; }
.preview-chip { padding: 6px 8px; border-radius: 999px; background: #eef1ef; font-size: 8px; }
.preview-primary { margin-top: 12px; width: 100%; height: 36px; border: 0; border-radius: 10px; background: var(--preview-accent); color: white; font-size: 10px; font-weight: 800; }
.preview-list { margin-top: 12px; overflow: hidden; border: 1px solid #e4e8e5; border-radius: 12px; }
.preview-list div { display: flex; justify-content: space-between; padding: 11px 12px; border-bottom: 1px solid #edf0ee; font-size: 9px; }
.preview-list div:last-child { border-bottom: 0; }

.prompt-panel { border: 1px solid #243128; border-radius: 16px; background: #202721; box-shadow: 0 18px 44px rgba(26,35,28,.14); overflow: hidden; }
.prompt-heading { padding-top: 20px; }
.prompt-heading h2 { font-size: 18px; letter-spacing: -.02em; }
.task-summary { margin-top: 4px; }
.prompt-preview { border-radius: 10px; }
.generate-button { min-height: 44px; border-radius: 9px; }

@media (max-width: 1120px) {
  .page-heading { grid-template-columns: 1fr; }
  .launcher-step-nav { max-width: 720px; }
  .workspace-flow { grid-template-columns: 1fr; }
  .workspace-side { position: static; }
  .mode-tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .launcher-shell { width: min(100% - 28px, 1380px); padding-top: 18px; }
  .page-heading { min-height: 0; padding: 22px; }
  .launcher-step-nav { grid-template-columns: 1fr; }
  .launcher-step-link { grid-template-columns: auto minmax(0, 1fr); align-items: center; }
  .launcher-step-link > small { grid-column: 2; }
  .stage-heading, .mode-picker, .style-direction, .platform-section, .color-theme-section { padding-inline: 16px; }
  .requirement-stage, .intent-form > .config-section:first-child, .intent-form > .config-section:not(:first-child) { padding-inline: 16px; }
  .mode-tabs { grid-template-columns: 1fr 1fr; }
  .style-card-grid { display: grid; grid-template-columns: 1fr 1fr; }
  .platform-grid, .color-theme-grid { grid-template-columns: 1fr 1fr; }
  .ds-foundation-grid, .component-strip { grid-template-columns: 1fr 1fr; }
  .ds-preview-shell { grid-template-columns: 1fr; }
  .preview-meta { display: none; }
}

@media (max-width: 520px) {
  .page-heading h1 { font-size: 32px; }
  .mode-tabs, .style-card-grid, .platform-grid, .color-theme-grid, .ds-foundation-grid, .component-strip { grid-template-columns: 1fr; }
  .preview-device, .preview-device[data-size="tablet"] { width: 100%; min-width: 0; }
  .stage-heading { flex-direction: column-reverse; }
}
