:root {
  --ink: #1f2925;
  --ink-soft: #50605a;
  --muted: #7d8984;
  --line: #e3e8e5;
  --line-strong: #ccd6d0;
  --paper: #f5f7f5;
  --panel: #ffffff;
  --sage-50: #f0f5f2;
  --sage-100: #e3eee8;
  --sage-300: #b8ccc0;
  --sage-500: #6e9180;
  --sage-700: #456b5a;
  --pink-50: #fff5f4;
  --pink-100: #f8dfdf;
  --pink-500: #c88084;
  --gold-50: #fff9eb;
  --gold-500: #b58a3a;
  --lavender: #f0edfb;
  --danger: #b45d63;
  --warning: #a67825;
  --shadow-sm: 0 4px 14px rgba(31, 50, 41, 0.045);
  --shadow: 0 18px 48px rgba(31, 50, 41, 0.1);
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 20px;
  --font: "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", system-ui, sans-serif;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { min-width: 1180px; background: var(--paper); }
body {
  margin: 0;
  min-width: 1180px;
  min-height: 100vh;
  background: var(--paper);
}
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled, textarea:disabled, select:disabled { cursor: not-allowed; opacity: 0.55; }
input, textarea, select { color: var(--ink); }
textarea { resize: vertical; }
.is-hidden { display: none !important; }
.app-shell { min-height: 100vh; }
body[data-auth-state="checking"] .auth-screen,
body[data-auth-state="authenticated"] .auth-screen { display: none; }
body:not([data-auth-state="authenticated"]) .app-shell { display: none; }
.auth-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 28px 48px;
  background: #edf1ee;
}
.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr);
  width: min(1120px, calc(100vw - 96px));
  height: min(680px, calc(100vh - 56px));
  min-height: 620px;
  overflow: hidden;
  border: 1px solid #d2dbd5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 28px 80px rgba(30, 54, 42, .14);
}
.auth-intro {
  position: relative;
  display: flex;
  min-width: 0;
  padding: 40px 44px 34px;
  overflow: hidden;
  flex-direction: column;
  color: #fff;
  background: #244d3d;
}
.auth-brand { display: flex; align-items: center; gap: 13px; }
.auth-brand strong, .auth-brand span { display: block; }
.auth-brand strong { color: #fff; font-size: 18px; font-weight: 750; letter-spacing: 0; }
.auth-brand span { margin-top: 3px; color: rgba(255, 255, 255, .66); font-size: 11px; }
.auth-brand .brand-mark { border-radius: 8px; background: #f4f7f5; }
.auth-value { position: relative; z-index: 1; margin-top: 38px; }
.auth-kicker { display: block; color: #efc886; font-size: 12px; font-weight: 800; }
.auth-value h1 { margin: 11px 0 0; max-width: 440px; color: #fff; font-size: 36px; line-height: 1.24; letter-spacing: 0; }
.auth-value > p { max-width: 450px; margin: 16px 0 0; color: rgba(255, 255, 255, .72); font-size: 14px; line-height: 1.75; }
.auth-feature-list { display: grid; gap: 12px; margin-top: 24px; }
.auth-feature-list > div { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: start; gap: 12px; }
.auth-feature-list i { display: grid; place-items: center; width: 30px; height: 30px; border: 1px solid rgba(255, 255, 255, .24); border-radius: 6px; color: #efc886; font-size: 10px; font-style: normal; font-weight: 800; }
.auth-feature-list b, .auth-feature-list small { display: block; }
.auth-feature-list b { color: #fff; font-size: 13px; }
.auth-feature-list small { margin-top: 3px; color: rgba(255, 255, 255, .58); font-size: 11px; }
.auth-deck-preview {
  position: absolute;
  right: 28px;
  bottom: 26px;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  width: 310px;
  min-height: 174px;
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 46px rgba(8, 25, 18, .28);
  transform: rotate(-1deg);
}
.auth-deck-rail { display: grid; align-content: start; gap: 8px; padding: 12px 9px; border-right: 1px solid #dce4df; background: #f2f5f3; }
.auth-deck-rail span { display: block; aspect-ratio: 16 / 9; border: 1px solid #dce4df; border-radius: 3px; background: #fff; }
.auth-deck-rail span:first-child { border-color: #527b67; box-shadow: 0 0 0 2px rgba(82, 123, 103, .12); }
.auth-deck-slide { position: relative; padding: 20px 20px 14px; color: #1d2e27; background: #fff; }
.auth-deck-slide::after { content: ""; position: absolute; top: 0; right: 0; width: 9px; height: 100%; background: #e8a199; }
.auth-deck-slide > small { color: #527b67; font-size: 8px; font-weight: 800; }
.auth-deck-slide > strong { display: block; margin-top: 6px; font-size: 15px; line-height: 1.35; }
.auth-deck-content { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 13px; }
.auth-deck-content > span { display: block; min-height: 50px; padding: 7px; border: 1px solid #e0e6e2; border-radius: 5px; background: #f8faf8; }
.auth-deck-content i { display: block; width: 14px; height: 14px; border-radius: 50%; background: #e9c77f; }
.auth-deck-content b, .auth-deck-content em { display: block; height: 3px; margin-top: 7px; border-radius: 2px; background: #4e6f60; }
.auth-deck-content em { width: 68%; margin-top: 5px; background: #cad6cf; }
.auth-deck-slide > p { margin: 11px 0 0; color: #87958e; font-size: 7px; }
.auth-intro-footer { position: relative; z-index: 1; width: 185px; margin: auto 0 0; color: rgba(255, 255, 255, .48); font-size: 10px; line-height: 1.6; }
.auth-panel { display: flex; min-width: 0; padding: 54px 58px 40px; flex-direction: column; background: #fff; }
.auth-copy { padding: 0 0 34px; }
.auth-copy > span { color: var(--sage-700); font-size: 12px; font-weight: 800; }
.auth-copy h2 { margin: 9px 0 0; color: var(--ink); font-size: 30px; line-height: 1.3; letter-spacing: 0; }
.auth-copy p { margin: 10px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.auth-form { display: grid; gap: 20px; }
.auth-form label > span:first-child { display: block; margin-bottom: 8px; color: var(--ink-soft); font-size: 13px; font-weight: 700; }
.auth-field-control { display: flex; align-items: center; width: 100%; height: 52px; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 6px; background: #fff; transition: border-color .16s ease, box-shadow .16s ease; }
.auth-field-control:focus-within { border-color: var(--sage-700); box-shadow: 0 0 0 3px rgba(49, 95, 73, .09); }
.auth-field-control b { display: grid; place-items: center; align-self: stretch; min-width: 58px; border-right: 1px solid var(--line); color: var(--ink-soft); background: #f7f9f7; font-size: 13px; }
.auth-form input { width: 100%; min-width: 0; height: 100%; padding: 0 14px; border: 0; color: var(--ink); background: transparent; font-size: 14px; outline: none; }
.auth-form input::placeholder { color: #9aa49f; }
.auth-code-row { display: grid; grid-template-columns: minmax(0, 1fr) 126px; gap: 10px; }
.auth-code-button { min-height: 52px; padding: 0 14px; border: 1px solid #9eb7a8; border-radius: 6px; color: var(--sage-700); background: #f8fbf9; font-size: 13px; font-weight: 750; }
.auth-code-button:hover:not(:disabled) { border-color: var(--sage-700); background: var(--sage-50); }
.auth-code-button:disabled { color: var(--muted); border-color: var(--line); background: #f4f6f4; }
.auth-message { min-height: 20px; margin: -3px 0 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.auth-message.is-success { color: var(--sage-700); }
.auth-message.is-error { color: var(--danger); }
.auth-submit { justify-content: center; min-height: 52px; margin-top: -2px; border-radius: 6px; font-size: 14px; }
.auth-security-note { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 11px; margin-top: auto; padding-top: 26px; border-top: 1px solid var(--line); }
.auth-security-note > i { position: relative; width: 27px; height: 30px; border: 2px solid #769384; border-radius: 13px 13px 8px 8px; }
.auth-security-note > i::before { content: ""; position: absolute; left: 7px; top: 7px; width: 9px; height: 6px; border-left: 2px solid #769384; border-bottom: 2px solid #769384; transform: rotate(-45deg); }
.auth-security-note b, .auth-security-note small { display: block; }
.auth-security-note b { color: var(--ink-soft); font-size: 11px; }
.auth-security-note small { margin-top: 3px; color: var(--muted); font-size: 10px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
}
.brand-lockup { display: flex; align-items: center; gap: 13px; }
.brand-lockup strong { display: block; font-size: 18px; font-weight: 700; letter-spacing: 0.01em; }
.brand-lockup span { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.brand-lockup > div > span, .topbar .connection-status { display: none; }
.brand-mark {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: #e4eee8;
}
.brand-mark::before, .brand-mark::after {
  content: "";
  position: absolute;
  border-radius: 100% 0 100% 0;
  background: #6f9a7c;
}
.brand-mark::before { left: 8px; top: 6px; width: 16px; height: 25px; transform: rotate(-26deg); }
.brand-mark::after { left: 18px; top: 9px; width: 12px; height: 21px; background: #94ad9f; transform: rotate(26deg); }
.brand-mark span, .brand-mark i { position: absolute; z-index: 1; left: 18px; top: 8px; width: 2px; height: 22px; background: rgba(255,255,255,.75); transform: rotate(28deg); }
.brand-mark i { left: 22px; top: 10px; height: 17px; transform: rotate(-25deg); }
.topbar-actions { display: flex; align-items: center; gap: 13px; }
.topbar-tool {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 12px;
  font-weight: 700;
}
.topbar-tool:hover { border-color: var(--sage-700); color: var(--sage-700); }
.user-session { display: flex; align-items: center; gap: 8px; padding-left: 2px; }
.user-session span { color: var(--ink-soft); font-size: 12px; }
.user-session button { padding: 7px 9px; border: 0; color: var(--muted); background: transparent; font-size: 11px; }
.user-session button:hover { color: var(--danger); }
.environment-badge, .route-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 13px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255,255,255,.82);
  font-size: 12px;
  white-space: nowrap;
}
.route-badge { color: var(--sage-700); background: var(--sage-50); }
.connection-status { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; white-space: nowrap; }
.connection-status i { width: 8px; height: 8px; border-radius: 50%; background: #aebbb4; box-shadow: 0 0 0 4px #edf2ee; }
.connection-status.is-ready { color: var(--sage-700); }
.connection-status.is-ready i { background: #68ab7b; }
.connection-status.is-error { color: var(--danger); }
.connection-status.is-error i { background: #ce7278; }
.connection-drawer { position: relative; }
.connection-drawer summary {
  list-style: none;
  padding: 9px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  color: var(--ink-soft);
  background: #fff;
  font-size: 13px;
  cursor: pointer;
}
.connection-drawer summary::-webkit-details-marker { display: none; }
.connection-popover { position: absolute; top: 46px; right: 0; z-index: 50; width: 350px; padding: 18px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: var(--shadow); }
.connection-popover label, .connection-popover label > span { display: block; }
.connection-popover label + label { margin-top: 12px; }
.connection-popover label > span { margin-bottom: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.connection-popover input { width: 100%; padding: 11px; border: 1px solid var(--line); border-radius: 10px; outline: none; }
.connection-buttons { display: flex; gap: 9px; margin-top: 15px; }
.connection-buttons button { flex: 1; }

.studio-layout { width: calc(100% - 40px); margin: 0 auto; padding: 16px 0 40px; }
.workspace-tabs {
  position: sticky;
  top: 70px;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: none;
  backdrop-filter: blur(12px);
}
.workspace-tab {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  grid-template-rows: auto;
  column-gap: 11px;
  align-items: center;
  min-height: 44px;
  padding: 6px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--ink-soft);
  background: transparent;
  text-align: left;
}
.workspace-tab > span:first-child {
  grid-row: 1;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  color: var(--sage-700);
  background: var(--sage-100);
  font-size: 12px;
  font-weight: 800;
}
.workspace-tab b { font-size: 13px; font-weight: 700; }
.workspace-tab small { color: var(--muted); font-size: 11px; line-height: 1.3; }
.workspace-tab em { align-self: start; padding: 4px 8px; border-radius: 999px; color: var(--muted); background: #eef3ef; font-size: 10px; font-style: normal; white-space: nowrap; }
.workspace-tab small, .workspace-tab em, .workspace-tab .tab-badges { display: none; }
.workspace-tab.is-active { border-color: #d8e2dc; color: var(--ink); background: var(--sage-50); box-shadow: none; }
.workspace-tab.is-active > span:first-child { color: #fff; background: var(--sage-700); box-shadow: 0 6px 16px rgba(79, 121, 98, 0.25); }
.workspace-tab.is-active em { color: var(--sage-700); background: var(--sage-100); }
.workspace-tab .state-chip { min-height: 0; padding: 4px 8px; font-size: 10px; }
.workspace-tab .state-chip.is-running { color: #74561d; background: #fff2d7; }
.workspace-tab .state-chip.is-waiting { color: #875b60; background: var(--pink-100); }
.workspace-tab .state-chip.is-complete { color: #3f7753; background: #ddf0e2; }
.workspace-tab .state-chip.is-error { color: var(--danger); background: #fae4e5; }
.workspace-live-strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(210px, 1fr) minmax(150px, .55fr) auto auto auto auto;
  align-items: center;
  gap: 11px;
  min-height: 40px;
  padding: 7px 9px 7px 12px;
  border: 1px solid #d7e5da;
  border-radius: 13px;
  background: linear-gradient(90deg, rgba(241,248,242,.97), rgba(255,247,243,.96));
}
.workspace-live-pulse { width: 9px; height: 9px; border: 2px solid #d7eadb; border-radius: 50%; background: #5f9970; animation: livePulse 1.8s ease-out infinite; }
.workspace-live-copy { min-width: 0; }
.workspace-live-copy strong, .workspace-live-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace-live-copy strong { color: var(--ink); font-size: 12px; }
.workspace-live-copy span { margin-top: 2px; color: var(--muted); font-size: 10px; }
.workspace-live-track { height: 6px; overflow: hidden; border-radius: 999px; background: rgba(91,126,99,.13); }
.workspace-live-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #82ae90, #e3aaae); transition: width .5s ease; animation: progressGlow 2.2s linear infinite; }
.workspace-live-percent { min-width: 38px; color: var(--sage-700); font-size: 13px; text-align: right; }
.workspace-live-time { color: var(--muted); font-size: 10px; white-space: nowrap; }
.workspace-live-time b { color: var(--ink-soft); font-weight: 800; }
.workspace-live-button { min-height: 30px; padding: 6px 10px; border: 0; border-radius: 9px; color: #fff; background: var(--sage-700); font-size: 10px; font-weight: 800; cursor: pointer; }

.task-context { margin-top: 18px; padding: 20px 22px 14px; scroll-margin-top: 205px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.84); box-shadow: var(--shadow-sm); }
.task-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.task-header h2 { margin: 6px 0 4px; font-size: 20px; font-weight: 800; }
.task-header p { margin: 0; color: var(--muted); font-size: 13px; }
.task-header-side { display: flex; align-items: center; justify-content: flex-end; gap: 9px; }
.task-context.is-live { padding-bottom: 18px; border-color: #cddfd2; background: rgba(250, 253, 250, .96); box-shadow: 0 18px 44px rgba(44, 73, 53, .13); }
.live-generation-card { margin-top: 16px; padding: 18px; overflow: hidden; border: 1px solid #d4e5d7; border-radius: 18px; background: linear-gradient(135deg, rgba(244,250,245,.98), rgba(255,248,244,.96)); }
.live-generation-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.live-generation-copy { display: flex; align-items: center; min-width: 0; gap: 12px; }
.live-generation-copy strong, .live-generation-copy p { display: block; }
.live-generation-copy strong { font-size: 16px; }
.live-generation-copy p { margin: 4px 0 0; color: var(--ink-soft); font-size: 12px; line-height: 1.45; }
.live-pulse { flex: 0 0 auto; width: 13px; height: 13px; border: 4px solid #dfeae1; border-radius: 50%; background: var(--sage-500); }
.task-context.is-live .live-pulse { box-shadow: 0 0 0 0 rgba(90,139,105,.35); animation: livePulse 1.8s ease-out infinite; }
.task-context.is-complete .live-pulse { border-color: #d8ebdc; background: #4f8a62; animation: none; }
.task-context.is-repair .live-pulse { border-color: #f2dfb4; background: #b6842d; animation: none; }
.task-context.is-error .live-pulse { border-color: #f6d9db; background: var(--danger); animation: none; }
.live-progress-score { flex: 0 0 auto; text-align: right; }
.live-progress-score strong, .live-progress-score span { display: block; }
.live-progress-score strong { color: var(--sage-700); font-size: 26px; line-height: 1; }
.live-progress-score span { margin-top: 5px; color: var(--muted); font-size: 9px; }
.live-progress-track { height: 9px; margin-top: 15px; overflow: hidden; border-radius: 999px; background: rgba(91,126,99,.12); }
.live-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #89b497, #e4aeb2); background-size: 180% 100%; box-shadow: 0 0 15px rgba(107,157,121,.3); transition: width .55s ease; }
.task-context.is-live .live-progress-track span { animation: progressGlow 2.2s linear infinite; }
.live-metric-grid { display: grid; grid-template-columns: .9fr .65fr .7fr 1.75fr; gap: 9px; margin-top: 13px; }
.live-metric-grid.has-delivery { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.live-metric-grid > div { min-width: 0; padding: 10px 11px; border: 1px solid rgba(207,225,211,.85); border-radius: 12px; background: rgba(255,255,255,.72); }
.live-metric-grid span, .live-metric-grid strong { display: block; }
.live-metric-grid span { color: var(--muted); font-size: 9px; }
.live-metric-grid strong { margin-top: 4px; overflow: hidden; font-size: 11px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.live-retry-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 13px; padding: 12px 14px; border: 1px solid #efc9cc; border-radius: 13px; background: linear-gradient(90deg, #fff5f5, #fffaf7); }
.live-retry-row strong, .live-retry-row span { display: block; }
.live-retry-row strong { color: #9b4e54; font-size: 12px; }
.live-retry-row span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.live-retry-row button { flex: 0 0 auto; min-width: 180px; border-color: #a75b61; background: #a75b61; }
.live-page-rail { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 7px; margin-top: 13px; }
.live-page-chip { display: grid; place-items: center; min-height: 38px; border: 1px solid #dce7de; border-radius: 11px; color: var(--muted); background: rgba(255,255,255,.65); font-size: 10px; font-weight: 800; }
.live-page-chip.is-active { border-color: #e6cf9e; color: #795c1f; background: #fff6df; }
.live-page-chip.is-completed { border-color: #c8dfce; color: #3d7651; background: #eaf5ec; }
.live-page-chip.is-reviewing { border-color: #dacdea; color: #6b558f; background: #f2edfa; }
.live-page-chip.is-repair { border-color: #ead39f; color: #7c5a17; background: #fff6df; }
.live-page-chip.is-failed { border-color: #efc9cc; color: #a34f55; background: #fcebed; }
.live-preview-area { margin-top: 14px; padding-top: 13px; border-top: 1px dashed #ceded1; }
.live-preview-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.live-preview-head span { color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.live-preview-head strong { color: var(--sage-700); font-size: 10px; }
.live-preview-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.live-preview-item { min-width: 0; padding: 0; overflow: hidden; border: 1px solid #d5e2d8; border-radius: 11px; background: #fff; cursor: zoom-in; }
.live-preview-item img, .live-preview-item video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #edf2ee; }
.live-preview-item.is-video { cursor: default; }
.live-preview-item span { display: flex; align-items: center; justify-content: space-between; gap: 5px; padding: 7px 8px; font-size: 9px; }
.live-preview-item span b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-preview-item span em { color: var(--sage-700); font-style: normal; white-space: nowrap; }
.live-stay-hint { margin: 12px 0 0; color: var(--muted); font-size: 10px; text-align: center; }
.state-chip { display: inline-flex; align-items: center; min-height: 34px; padding: 7px 12px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.state-chip.is-idle { color: var(--muted); background: #edf1ee; }
.state-chip.is-running { color: #74561d; background: #fff2d7; }
.state-chip.is-waiting { color: #875b60; background: var(--pink-100); }
.state-chip.is-complete { color: #3f7753; background: #ddf0e2; }
.state-chip.is-repair { color: #7c5a17; background: #fff0c9; }
.state-chip.is-error { color: var(--danger); background: #fae4e5; }
.stage-board { margin-top: 14px; border-top: 1px solid var(--line); }
.stage-board summary { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 13px 2px 3px; list-style: none; cursor: pointer; }
.stage-board summary::-webkit-details-marker { display: none; }
.stage-board summary span { color: var(--muted); font-size: 12px; font-weight: 700; }
.stage-board summary strong { font-size: 13px; }
.stage-board summary i { color: var(--sage-700); font-size: 11px; font-style: normal; }
.stage-board summary i::after { content: "展开"; }
.stage-board[open] summary i::after { content: "收起"; }
.stage-board:not([open]) > .stage-list { display: none; }
.stage-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; padding: 14px 0 6px; }
.stage-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfb; }
.stage-icon { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 9px; color: var(--muted); background: #edf2ee; font-weight: 800; }
.stage-copy strong, .stage-copy small { display: block; }
.stage-copy strong { font-size: 12px; }
.stage-copy small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 1.3; }
.stage-status { color: var(--muted); font-size: 10px; }
.stage-row.is-running { border-color: #ecd8ae; background: #fffaf0; }
.stage-row.is-running .stage-icon { color: var(--warning); background: #fff0cc; }
.stage-row.is-waiting { border-color: #ebd0d1; background: var(--pink-50); }
.stage-row.is-waiting .stage-icon { color: var(--pink-500); background: var(--pink-100); }
.stage-row.is-repair { border-color: #ead39f; background: #fffaf0; }
.stage-row.is-repair .stage-icon { color: #8a651d; background: #fff0c9; }
.stage-row.is-completed { border-color: #cfe2d4; background: var(--sage-50); }
.stage-row.is-completed .stage-icon { color: #fff; background: var(--sage-500); }
.stage-placeholder { grid-column: 1 / -1; padding: 15px; color: var(--muted); font-size: 12px; text-align: center; }

.workspace-panels { margin-top: 20px; }
.workspace-panel { display: none; }
.workspace-panel.is-active { display: block; }
.panel-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 18px; }
.panel-heading h3 { margin: 7px 0 5px; font-size: 28px; line-height: 1.25; }
.panel-heading p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.7; }
.eyebrow { color: var(--sage-700); font-size: 11px; font-weight: 900; letter-spacing: .13em; text-transform: uppercase; }
.topic-field, .topic-field > span { display: block; }
.topic-field > span { margin-bottom: 8px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.topic-field input { width: 100%; height: 58px; padding: 0 17px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--ink); background: #fff; font-size: 17px; outline: none; }
.topic-field input::placeholder, .goal-input::placeholder { color: #a2aaa6; }
.scenario-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.scenario-card { display: grid; grid-template-columns: 36px minmax(0, 1fr); align-items: center; gap: 11px; min-height: 76px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; color: var(--ink-soft); background: #fbfcfb; text-align: left; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.scenario-card:hover { border-color: var(--sage-300); transform: translateY(-1px); }
.scenario-card i { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; color: var(--sage-700); background: var(--sage-100); font-size: 13px; font-style: normal; font-weight: 800; }
.scenario-card b, .scenario-card small { display: block; }
.scenario-card b { color: var(--ink); font-size: 13px; }
.scenario-card small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.scenario-card.is-selected { border-color: #9fbea9; background: var(--sage-50); box-shadow: inset 0 0 0 1px #dbe9df; }
.scenario-card.is-selected i { color: #fff; background: var(--sage-700); }
.scenario-context-panel { display: grid; grid-template-columns: 1.15fr .8fr 1fr; gap: 10px; margin-top: 16px; padding: 14px; border-radius: 12px; background: #f5f8f6; }
.scenario-context-panel label, .scenario-context-panel label > span { display: block; }
.scenario-context-panel label > span { margin-bottom: 7px; color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.scenario-context-panel input, .scenario-context-panel select { width: 100%; height: 42px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 9px; background: #fff; font-size: 12px; outline: none; }
.scenario-hint { margin: 10px 2px 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.goal-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line); }
.goal-heading > div strong, .goal-heading > div span { display: block; }
.goal-heading > div strong { font-size: 14px; }
.goal-heading > div span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.ai-assist-button { display: inline-flex; align-items: center; gap: 7px; padding: 9px 13px; border: 1px solid #bfd1c6; border-radius: 9px; color: var(--sage-700); background: var(--sage-50); font-size: 12px; }
.ai-assist-button:hover { border-color: #99b3a4; background: #e9f1ec; }
.ai-assist-button span { font-size: 14px; }
.ai-content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.ai-content-field { min-width: 0; }
.ai-content-field > span { display: block; min-height: 43px; }
.ai-content-field > span b, .ai-content-field > span small { display: block; }
.ai-content-field > span b { color: var(--ink); font-size: 13px; }
.ai-content-field > span small { margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.ai-content-field > em { display: block; margin-top: 7px; color: var(--muted); font-size: 10px; font-style: normal; text-align: right; }
.goal-input { width: 100%; min-height: 142px; margin-top: 12px; padding: 14px 15px; border: 1px solid var(--line-strong); border-radius: 12px; color: var(--ink); background: #fbfcfb; font-size: 14px; line-height: 1.75; outline: none; }
.ai-content-grid .goal-input { min-height: 172px; margin-top: 9px; resize: vertical; }
.ai-content-status { margin-top: 10px; padding: 10px 12px; border-radius: 9px; color: var(--sage-700); background: var(--sage-50); font-size: 11px; line-height: 1.55; }
.goal-footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 7px; color: var(--muted); font-size: 10px; }
.goal-footer em { flex: 0 0 auto; font-style: normal; }
.brief-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 12px; }
.field-block { display: block; color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.field-block > span { display: block; margin-bottom: 7px; }
.field-block > span small { color: var(--muted); font-weight: 500; }
.field-block input, .field-block textarea { width: 100%; padding: 12px 13px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fcfefc; font-size: 14px; line-height: 1.6; outline: none; }
.brief-card textarea { min-height: 145px; }
input:focus, textarea:focus, select:focus { border-color: #8fb59a; box-shadow: 0 0 0 3px rgba(120, 161, 135, .12); }
.prompt-starters { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.prompt-starters > span { color: var(--muted); font-size: 11px; }
.prompt-starters button { padding: 6px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--sage-700); background: var(--sage-50); font-size: 11px; }
.skill-card { padding: 18px; }
.skill-pipeline { display: grid; gap: 7px; }
.pipeline-node { display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fbfdfb; }
.pipeline-node strong { font-size: 13px; }
.pipeline-node small { grid-column: 2; color: var(--muted); font-size: 10px; }
.skill-tag { grid-row: 1 / 3; padding: 5px 7px; border-radius: 8px; color: var(--sage-700); background: var(--sage-100); font-size: 9px; font-weight: 900; }
.user-tag { color: #9b6266; background: var(--pink-100); }
.pipeline-arrow { color: var(--sage-500); font-size: 13px; text-align: center; }

.primary-button, .secondary-button, .soft-button, .ghost-button, .icon-button {
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 11px;
  font-size: 13px;
  font-weight: 800;
}
.primary-button { border: 1px solid var(--sage-700); color: #fff; background: var(--sage-700); box-shadow: 0 8px 20px rgba(79, 121, 98, .2); }
.primary-button:hover:not(:disabled) { background: #426c56; }
.secondary-button { border: 1px solid var(--line-strong); color: var(--sage-700); background: #fff; }
.soft-button { border: 1px solid #cfe1d3; color: var(--sage-700); background: var(--sage-50); }
.ghost-button, .icon-button { border: 0; color: var(--muted); background: transparent; }
.full-button { width: 100%; }
.retry-task-button { max-width: 300px; white-space: normal; line-height: 1.35; }

.outline-empty, .visual-empty { display: grid; place-items: center; min-height: 470px; padding: 36px; border: 1px dashed #cadfd0; border-radius: var(--radius-lg); background: rgba(251, 254, 250, .8); text-align: center; }
.outline-empty strong, .visual-empty strong { margin-top: 18px; font-size: 22px; }
.outline-empty p, .visual-empty p { margin: 8px 0 18px; color: var(--muted); font-size: 13px; }
.generated-assets { margin-bottom: 16px; padding: 16px; border: 1px solid #d8e5da; border-radius: 16px; background: linear-gradient(135deg, #f4faf5, #fff8f5); }
.generated-assets-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.generated-assets-head span, .generated-assets-head strong { display: block; }
.generated-assets-head span { color: var(--sage-700); font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.generated-assets-head strong { margin-top: 4px; font-size: 13px; }
.generated-assets-head em { padding: 5px 9px; border-radius: 999px; color: #875b60; background: var(--pink-100); font-size: 10px; font-style: normal; font-weight: 800; }
.generated-assets-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: 12px; }
.generated-asset-card { padding: 0; overflow: hidden; border: 1px solid #d5e1d7; border-radius: 13px; background: #fff; box-shadow: 0 8px 18px rgba(58,86,66,.07); cursor: zoom-in; }
.generated-asset-card img, .generated-asset-card video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #edf2ee; }
.generated-asset-card.is-video { cursor: default; }
.generated-asset-card span { display: flex; justify-content: space-between; gap: 8px; padding: 9px 10px; color: var(--ink-soft); font-size: 10px; }
.generated-asset-card span b { color: var(--ink); }
.empty-orbit { position: relative; display: block; width: 76px; height: 76px; border: 1px solid #bdd8c4; border-radius: 50%; }
.empty-orbit::before, .empty-orbit::after { content: ""; position: absolute; inset: 14px; border: 1px solid #e4babc; border-radius: 50%; transform: rotate(45deg); }
.empty-orbit::after { inset: 27px; border: 0; background: #dfeee1; }
.outline-editor { display: grid; gap: 14px; }
.outline-summary-card { display: grid; gap: 20px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.outline-meta-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 20px; }
.outline-meta-grid label { min-width: 0; color: var(--ink-soft); font-size: 12px; font-weight: 800; }
.outline-meta-grid input { width: 100%; margin-top: 8px; padding: 12px; border: 1px solid var(--line-strong); border-radius: 10px; font-size: 14px; }
.outline-summary-card .field-block textarea { min-height: 86px; }
.outline-editor textarea { overflow: hidden; resize: none; }
.slide-toolbar { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 20px; padding: 8px 4px; }
.slide-toolbar strong { font-size: 14px; }
.slide-toolbar span { color: var(--muted); font-size: 12px; }
.slide-list { display: grid; min-width: 0; gap: 20px; }
.slide-card { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.slide-card:focus-within { border-color: var(--sage-300); }
.slide-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.slide-number { margin: 0; padding: 7px 12px; border-radius: 8px; color: var(--sage-700); background: var(--sage-100); font-size: 13px; font-weight: 800; }
.slide-card-head > span { color: var(--muted); font-size: 12px; }
.slide-card-grid { display: grid; gap: 18px; }
.slide-card-grid label { display: grid; grid-template-columns: 88px minmax(0, 1fr); align-items: baseline; gap: 6px 16px; min-width: 0; color: var(--muted); font-size: 12px; font-weight: 700; }
.slide-card-grid input, .slide-card-grid textarea, .slide-card-grid select { display: block; width: 100%; min-width: 0; margin: 0; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: #fcfefc; font-family: inherit; font-size: 14px; font-weight: 400; line-height: 1.7; }
.slide-card-grid textarea { min-height: 70px; }
.slide-card-grid .slide-title-field input { font-size: 18px; font-weight: 700; }
.slide-card-grid label > small { grid-column: 2; font-size: 11px; font-weight: 400; line-height: 1.6; }
@media (max-width: 560px) {
  .outline-summary-card, .slide-card { padding: 18px 16px; }
  .slide-card-grid label { grid-template-columns: minmax(0, 1fr); }
  .slide-card-grid label > small { grid-column: 1; }
  .outline-editor .sticky-actions { bottom: 8px; flex-wrap: wrap; }
  .outline-editor .sticky-actions .primary-button { flex: 1; }
}
.preview-empty { display: grid; place-items: center; padding: 28px; color: var(--muted); text-align: center; }
.preview-empty strong { margin-top: 15px; color: var(--ink-soft); font-size: 16px; }
.preview-empty small { margin-top: 6px; font-size: 11px; }
.empty-slide { position: relative; display: block; width: 94px; height: 56px; border: 1px solid #bad1c0; border-radius: 8px; background: #fff; box-shadow: 10px 10px 0 #e1eee3; }
.empty-slide::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 14px; height: 7px; border-radius: 999px; background: linear-gradient(90deg, #bad8c1 0 58%, #efc7c9 58%); }
.preview-caption { margin-top: 10px; color: var(--muted); font-size: 11px; text-align: center; }
.sticky-actions { position: sticky; bottom: 14px; z-index: 8; display: flex; justify-content: flex-end; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: rgba(255,255,255,.94); box-shadow: var(--shadow); backdrop-filter: blur(12px); }

.visual-layout { display: grid; flex: 1; min-height: 0; grid-template-columns: 156px minmax(0, 1fr) 320px; gap: 14px; }
.visual-canvas-column { display: grid; min-width: 0; min-height: 0; grid-template-rows: minmax(0, 1fr) auto auto; gap: 10px; }
.visual-main-frame { display: grid; place-items: center; width: 100%; min-width: 0; min-height: 0; padding: 16px; overflow: hidden; border: 1px solid #cdded2; border-radius: 14px; background: #e8eee9; cursor: zoom-in; }
/* 页面资源固定为 16:9；用自身尺寸约束缩放，避免被视口高度拉伸或裁掉底部。 */
.visual-main-frame img { display: none; width: auto; height: auto; max-width: 100%; max-height: 100%; aspect-ratio: 16 / 9; object-fit: contain; background: #fff; }
.visual-review-panel { position: static; width: 100%; max-width: none; height: 100%; max-height: none; min-width: 0; min-height: 0; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); }
.visual-review-panel[open] { display: flex; flex-direction: column; }
.visual-gate-head, .visual-audit-card, .visual-repair-card { padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.visual-gate-head span, .visual-gate-head strong { display: block; }
.visual-gate-head span { color: var(--muted); font-size: 11px; }
.visual-gate-head strong { margin-top: 5px; font-size: 17px; }
.visual-audit-card > div { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.visual-audit-card span { color: var(--muted); font-size: 11px; }
.visual-audit-card strong { font-size: 12px; text-align: right; }
.visual-audit-card p { margin: 8px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.55; }
.visual-audit-card.is-pass { border-color: #c7dfcd; background: var(--sage-50); }
.visual-audit-card.is-warn { border-color: #edd7a8; background: var(--gold-50); }
.visual-audit-card.is-fail { border-color: #ecc9cb; background: var(--pink-50); }
.visual-preview-grid { display: flex; flex-direction: column; flex: 1; min-height: 0; gap: 10px; padding: 8px; overflow-y: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }
.visual-preview-card { flex: none; min-width: 0; padding: 5px; border: 1px solid var(--line); border-radius: 9px; background: #fff; text-align: left; transition: border-color .16s ease, box-shadow .16s ease; }
.visual-preview-card:hover { border-color: var(--sage-500); transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.visual-preview-card.is-selected { border-color: var(--sage-700); box-shadow: inset 0 0 0 1px var(--sage-700); }
.visual-preview-card img { display: block; width: 100%; aspect-ratio: 16 / 9; border-radius: 7px; object-fit: cover; background: #edf3ee; }
.visual-preview-card > span { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: 6px; }
.visual-preview-card span b { color: var(--ink-soft); font-size: 10px; }
.visual-media-status { display: inline-flex; align-items: center; padding: 3px 5px; border-radius: 999px; font-size: 8px; font-style: normal; white-space: nowrap; }
.visual-media-status.is-image-ready { color: #2f6d4a; background: #e3f3e6; }
.visual-media-status.is-image-planned { color: #8d6824; background: #fff3d8; }
.visual-media-status.is-video-ready { color: #69549b; background: #eee8ff; }
.visual-media-status.is-fallback { color: #a1585b; background: #fbe9e9; }
.visual-media-status.is-native { color: #64726d; background: #eef2ef; }
.visual-repair-card > div span, .visual-repair-card > div strong { display: block; }
.visual-repair-card > div span { color: var(--pink-500); font-size: 10px; font-weight: 900; letter-spacing: .08em; }
.visual-repair-card > div strong { margin-top: 5px; font-size: 15px; }
.visual-repair-card label { display: block; margin-top: 12px; }
.visual-repair-card label > span { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: 11px; font-weight: 800; }
.visual-repair-card input, .visual-repair-card textarea, .visual-repair-card select { width: 100%; padding: 10px 11px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fcfefc; font-size: 12px; line-height: 1.55; }
.visual-repair-card textarea { min-height: 130px; max-height: 240px; }
.visual-repair-card small { display: block; margin-top: 5px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.visual-repair-card button { margin-top: 11px; }
.repair-options { margin-top: 10px; font-size: 12px; color: var(--muted); }
.repair-options summary { cursor: pointer; }
.repair-progress { margin: 10px 0 0; padding: 9px 10px; border-radius: 9px; color: var(--warning); background: #fff3d7; font-size: 12px; line-height: 1.5; }

.user-delivery-card { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 36px; border: 1px solid #c9ded0; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.user-delivery-copy { min-width: 0; }
.user-delivery-copy span, .user-delivery-copy strong { display: block; }
.user-delivery-copy span { color: var(--sage-700); font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.user-delivery-copy h3 { margin: 10px 0 22px; font-size: 26px; line-height: 1.4; overflow-wrap: anywhere; }
.user-delivery-copy strong { margin-top: 6px; font-size: 15px; }
.user-delivery-copy p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.6; }
.user-delivery-card.has-notice { border-color: #dcc28d; }
.user-delivery-card.has-notice .user-delivery-copy p { color: #856321; }
.user-download-button { flex: 0 0 auto; min-width: 190px; min-height: 48px; justify-content: center; font-size: 13px; }
.quality-loop-card { padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.quality-kicker, .quality-loop-card strong, .quality-loop-card p { display: block; }
.quality-kicker { color: var(--muted); font-size: 10px; }
.quality-loop-card strong { margin-top: 4px; font-size: 16px; }
.quality-loop-card p { margin: 5px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.5; }
.delivery-actions { display: grid; flex: none; gap: 10px; width: 200px; }
.delivery-actions button { min-height: 44px; font-size: 13px; }
.delivery-details { margin-top: 20px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.75); }
.delivery-details > summary { display: flex; justify-content: space-between; padding: 16px 20px; color: var(--muted); font-size: 13px; cursor: pointer; list-style: none; }
.delivery-details > summary::-webkit-details-marker { display: none; }
.delivery-details > summary::after { content: "展开"; color: var(--sage-700); }
.delivery-details[open] > summary::after { content: "收起"; }
.delivery-details-body { padding: 0 16px 16px; }
.delivery-details:not([open]) > .delivery-details-body { display: none; }
.delivery-details .task-context { margin-top: 12px; padding: 16px; border-radius: 12px; box-shadow: none; }
html:has(body.is-delivery-workspace), body.is-delivery-workspace { min-width: 0; }
.is-delivery-workspace .studio-layout { padding-top: 16px; }
.is-delivery-workspace .workspace-tab small, .is-delivery-workspace .workspace-tab em,
.is-delivery-workspace .tab-badges, .is-delivery-workspace .workspace-live-strip { display: none; }
.is-delivery-workspace .workspace-panels { margin-top: 28px; }
.is-delivery-workspace [data-workspace-panel="delivery"] { padding-top: 0; }
.is-delivery-workspace :is(button, summary):focus-visible { outline: 2px solid var(--sage-700); outline-offset: 3px; }
@media (max-width: 700px) {
  .is-delivery-workspace .topbar { height: 56px; padding: 0 14px; }
  .is-delivery-workspace .brand-lockup strong { font-size: 15px; }
  .is-delivery-workspace .brand-mark { width: 28px; height: 28px; }
  .is-delivery-workspace .topbar-actions { gap: 6px; }
  .is-delivery-workspace .user-session span { display: none; }
  .is-delivery-workspace .studio-layout { width: calc(100% - 24px); padding-top: 10px; }
  .is-delivery-workspace .workspace-tab { display: flex; justify-content: center; padding: 6px 2px; min-height: 36px; }
  .is-delivery-workspace .workspace-tab > span:first-child { display: none; }
  .is-delivery-workspace .workspace-tab b { font-size: 11px; }
  .user-delivery-card { flex-direction: column; align-items: stretch; gap: 22px; padding: 24px; }
  .user-delivery-copy h3 { font-size: 22px; }
  .delivery-actions { width: 100%; }
  .delivery-details .task-header { flex-direction: column; align-items: stretch; }
  .delivery-details .task-header-side { flex-wrap: wrap; justify-content: flex-start; }
  .delivery-details .stage-list { grid-template-columns: 1fr; }
  .delivery-details .stage-board summary { grid-template-columns: 1fr auto; }
  .delivery-details .stage-board summary strong { display: none; }
  .delivery-details .live-metric-grid { grid-template-columns: 1fr; }
  .delivery-details .live-preview-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .delivery-details .live-page-rail { display: flex; flex-wrap: wrap; }
  .delivery-details .live-generation-head { gap: 12px; }
}
.delivery-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 16px; margin-top: 16px; }
.quality-column, .artifact-column { min-height: 360px; padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); }
.subheading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.subheading span { color: var(--muted); font-size: 11px; font-weight: 800; }
.subheading strong { font-size: 13px; }
.qa-list { display: grid; gap: 8px; }
.qa-row { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: 11px; background: #fbfdfb; font-size: 12px; }
.qa-icon { display: grid; place-items: center; width: 25px; height: 25px; border-radius: 8px; font-weight: 900; }
.qa-row.is-pass .qa-icon { color: #fff; background: var(--sage-500); }
.qa-row.is-warn .qa-icon { color: var(--warning); background: #fff0cc; }
.qa-row.is-fail .qa-icon { color: var(--danger); background: #f8dfe0; }
.artifact-list { display: grid; gap: 12px; }
.artifact-group { overflow: hidden; border: 1px solid var(--line); border-radius: 13px; background: #fbfdfb; }
.artifact-group > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 13px; border-bottom: 1px solid var(--line); background: #f6faf6; }
.artifact-group > header strong { font-size: 12px; }
.artifact-group > header span { color: var(--muted); font-size: 10px; }
.artifact-group details > summary { display: flex; align-items: center; justify-content: space-between; padding: 11px 13px; list-style: none; color: var(--ink-soft); font-size: 11px; cursor: pointer; }
.artifact-group details > summary::-webkit-details-marker { display: none; }
.artifact-rows { display: grid; }
.artifact-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 9px 13px; border-top: 1px solid var(--line); background: #fff; }
.artifact-row:first-child { border-top: 0; }
.artifact-name { min-width: 0; overflow: hidden; color: var(--ink-soft); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.artifact-row button { padding: 6px 10px; border: 0; border-radius: 8px; color: var(--sage-700); background: var(--sage-100); font-size: 10px; font-weight: 800; }
.artifact-row.is-primary { min-height: 62px; }
.artifact-row.is-primary .artifact-name { color: var(--ink); font-size: 13px; font-weight: 800; }
.artifact-row.is-primary button { padding: 9px 13px; color: #fff; background: var(--sage-700); font-size: 11px; }

.visual-preview-dialog { width: min(1720px, 98vw); max-width: none; max-height: 98vh; padding: 0; border: 1px solid #cbdcd1; border-radius: 20px; background: #f7faf7; box-shadow: 0 30px 100px rgba(28, 48, 36, .25); }
.visual-preview-dialog::backdrop { background: rgba(30, 48, 37, .52); backdrop-filter: blur(7px); }
.visual-dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 20px; border-bottom: 1px solid var(--line); background: #fff; }
.visual-dialog-head span, .visual-dialog-head strong { display: block; }
.visual-dialog-head span { color: var(--muted); font-size: 10px; }
.visual-dialog-head strong { margin-top: 3px; font-size: 15px; }
.visual-dialog-canvas { display: grid; place-items: center; min-height: min(78vh, 840px); max-height: 84vh; padding: 12px 24px; overflow: auto; }
.visual-dialog-canvas img { display: block; max-width: 100%; max-height: 81vh; border-radius: 8px; box-shadow: var(--shadow); cursor: zoom-out; }
.visual-dialog-actions { display: flex; align-items: center; justify-content: center; gap: 18px; padding: 12px 20px; border-top: 1px solid var(--line); background: #fff; }
.visual-dialog-actions span { min-width: 100px; color: var(--ink-soft); font-size: 12px; text-align: center; }
.toast { position: fixed; top: auto; left: 50%; right: auto; bottom: max(24px, env(safe-area-inset-bottom, 0px)); z-index: 100; width: max-content; max-width: min(430px, calc(100vw - 32px)); margin: 0; padding: 12px 14px; border: 1px solid #c9dfd173; border-radius: 12px; color: #285a43; background: linear-gradient(110deg, rgba(237, 247, 239, .42), rgba(248, 252, 248, .28)); -webkit-backdrop-filter: blur(6px) saturate(120%); backdrop-filter: blur(6px) saturate(120%); box-shadow: 0 6px 22px #234d3514, 0 1px 3px #234d3508, inset 0 1px 0 #ffffff99; font-size: 13px; font-weight: 500; line-height: 1.6; overflow-wrap: anywhere; opacity: 0; transform: translate(-50%, 6px); pointer-events: none; transition: opacity .18s ease, transform .18s ease; }
.toast.is-visible { display: flex; align-items: center; gap: 10px; opacity: 1; transform: translate(-50%, 0); }
.toast.is-sidebar { left: var(--toast-left); bottom: var(--toast-bottom); width: var(--toast-width); transform: translateY(6px); }
.toast.is-sidebar.is-visible { transform: translateY(0); }
.toast-icon { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; color: #fff; background: #458665; font-size: 14px; font-weight: 700; line-height: 1; }
#toastMessage { min-width: 0; }
.toast::backdrop { background: transparent; pointer-events: none; }
.toast[data-kind="error"] { border-color: #efc6c973; color: #9c3f48; background: linear-gradient(110deg, rgba(255, 240, 241, .42), rgba(255, 248, 248, .28)); }
.toast[data-kind="error"] .toast-icon { background: #b75a63; }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }

.workspace-dialog {
  width: min(1180px, 94vw);
  max-width: none;
  height: min(820px, 90vh);
  padding: 0;
  overflow: hidden;
  border: 1px solid #c8d7cd;
  border-radius: 12px;
  background: #f7faf8;
  box-shadow: 0 28px 90px rgba(28, 48, 36, .24);
}
.workspace-dialog::backdrop { background: rgba(28, 45, 35, .48); backdrop-filter: blur(5px); }
.workspace-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
  background: #fff;
}
.workspace-dialog-head span, .workspace-dialog-head strong, .workspace-dialog-head p { display: block; }
.workspace-dialog-head span { color: var(--sage-700); font-size: 11px; font-weight: 800; }
.workspace-dialog-head strong { margin-top: 4px; font-size: 22px; }
.workspace-dialog-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.task-library-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 170px 150px auto auto;
  align-items: end;
  gap: 10px;
  padding: 17px 24px;
  border-bottom: 1px solid var(--line);
  background: #fbfdfb;
}
.task-library-toolbar label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.task-library-toolbar input, .task-library-toolbar select {
  width: 100%;
  height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  outline: none;
}
.task-library-toolbar input:focus, .task-library-toolbar select:focus {
  border-color: var(--sage-700);
  box-shadow: 0 0 0 3px rgba(49, 95, 73, .08);
}
.task-library-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 24px;
  color: var(--muted);
  font-size: 11px;
}
.task-library-summary strong { color: var(--ink-soft); font-size: 12px; }
.task-library-list {
  --task-library-columns: minmax(0, 1fr) 200px 140px 272px;
  height: calc(90vh - 250px);
  min-height: 330px;
  padding: 0 24px 20px;
  overflow: auto;
  scrollbar-gutter: stable;
}
.task-library-columns, .task-library-row {
  display: grid;
  grid-template-columns: var(--task-library-columns);
  column-gap: 18px;
  padding-inline: 16px;
}
.task-library-columns {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-block: 12px;
  border-bottom: 1px solid var(--line);
  border-radius: 8px 8px 0 0;
  color: var(--muted);
  background: #edf3ef;
  font-size: 11px;
  font-weight: 700;
}
.task-library-columns > :last-child { text-align: right; }
.task-library-row {
  align-items: center;
  row-gap: 14px;
  min-height: 110px;
  padding-block: 18px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.task-library-columns + .task-library-row { border-top: 0; }
.task-library-row:last-child { border-radius: 0 0 8px 8px; }
.task-library-row > * { min-width: 0; }
.task-library-main strong { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; color: var(--ink); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.task-library-info { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 7px; color: var(--muted); font-size: 11px; }
.task-library-info > span + span::before { content: "·"; margin-right: 8px; }
.task-library-id { display: block; overflow: hidden; margin-top: 4px; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.task-library-meta { display: grid; gap: 9px; }
.task-library-meta > div { display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: baseline; gap: 8px; }
.task-library-meta span { color: var(--muted); font-size: 11px; }
.task-library-meta b { overflow: hidden; color: var(--ink-soft); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.task-library-state { display: grid; gap: 8px; }
.task-library-status { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.task-library-status > :last-child { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.task-library-updated { color: var(--muted); font-size: 10px; white-space: nowrap; }
.task-progress { min-width: 0; }
.task-progress div { height: 6px; overflow: hidden; border-radius: 3px; background: #e8eeea; }
.task-progress i { display: block; height: 100%; background: var(--sage-700); }
.task-progress span { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; }
.task-status-label { display: inline-flex; flex: none; justify-content: center; padding: 5px 9px; border-radius: 6px; color: var(--ink-soft); background: #eef3ef; font-size: 11px; font-weight: 700; white-space: nowrap; }
.task-status-label.is-completed { color: #2f6a4d; background: #e2f2e8; }
.task-status-label.is-failed { color: #9c4d52; background: #fbe9ea; }
.task-status-label.is-running { color: #85631e; background: #fff2cf; }
.task-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.task-row-actions button { flex: none; min-height: 34px; padding: 6px 9px; font-size: 11px; white-space: nowrap; }
.task-row-actions [data-task-action="open"] { color: var(--sage-700); background: #edf5ef; border-color: #c7dacc; }
.task-row-actions .archive-action { color: var(--muted); }
.task-row-actions .delete-action { color: #9c4d52; border-color: #efcfd1; }
.task-row-actions .delete-action:hover { background: #fff4f4; }
.delete-task-dialog {
  width: min(460px, calc(100vw - 48px));
  padding: 0;
  border: 0;
  border-radius: 12px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 24px 70px rgba(28, 45, 35, .24);
}
.delete-task-dialog::backdrop { background: rgba(28, 45, 35, .48); backdrop-filter: blur(5px); }
.delete-task-dialog-body { padding: 24px; }
.delete-task-dialog-body > span { color: #9c4d52; font-size: 11px; font-weight: 800; }
.delete-task-dialog-body > strong { display: block; margin-top: 6px; font-size: 20px; }
.delete-task-dialog-body > p { margin: 12px 0 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.delete-task-dialog-body > div { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.danger-button {
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #a9484f;
  border-radius: 8px;
  color: #fff;
  background: #a9484f;
  font-weight: 700;
  cursor: pointer;
}
.danger-button:hover { background: #923b42; }
.danger-button:disabled { cursor: wait; opacity: .62; }
.workspace-empty { display: grid; place-items: center; min-height: 260px; color: var(--muted); font-size: 12px; }
.workspace-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 13px 24px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.workspace-dialog-footer span { min-width: 80px; color: var(--muted); font-size: 11px; text-align: center; }
@media (max-width: 1320px) {
  .workspace-live-strip { grid-template-columns: auto minmax(180px, 1fr) minmax(120px, .45fr) auto auto auto; }
  .workspace-live-time.is-eta { display: none; }
  .scenario-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .model-role-list { grid-template-columns: 1fr; }
  .brief-grid { grid-template-columns: 1fr; }
  .visual-main-frame { min-height: 0; }
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(90, 139, 105, .36); }
  70% { box-shadow: 0 0 0 10px rgba(90, 139, 105, 0); }
  100% { box-shadow: 0 0 0 0 rgba(90, 139, 105, 0); }
}

@keyframes progressGlow {
  0% { background-position: 0 0; }
  100% { background-position: 180% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .workspace-live-pulse,
  .workspace-live-track span,
  .task-context.is-live .live-pulse,
  .task-context.is-live .live-progress-track span { animation: none; }
}

/* 2026-09 产品化视觉收尾：桌面端清晰信息层级与完整新组件 */
:root {
  --ink: #17231e;
  --ink-soft: #46564f;
  --muted: #748179;
  --line: #dfe7e1;
  --line-strong: #c8d5cc;
  --paper: #f4f7f4;
  --sage-50: #f0f6f2;
  --sage-100: #dfede4;
  --sage-300: #a9c5b3;
  --sage-500: #648c73;
  --sage-700: #315f49;
  --pink-50: #fff7f6;
  --pink-100: #f8e2e0;
  --pink-500: #c9797f;
  --shadow-sm: 0 8px 24px rgba(32, 59, 45, .055);
  --shadow: 0 22px 60px rgba(32, 59, 45, .11);
  --radius: 18px;
  --radius-lg: 24px;
}

body {
  color: var(--ink);
  background:
    radial-gradient(circle at 8% 3%, rgba(197, 222, 204, .45), transparent 30%),
    radial-gradient(circle at 94% 12%, rgba(249, 224, 220, .42), transparent 28%),
    var(--paper);
}
.topbar { box-shadow: 0 1px 0 rgba(49,95,73,.03); }
.brand-lockup strong { font-size: 19px; }
.brand-lockup span { font-size: 13px; }
.workspace-panel { padding-top: 22px; }

.scenario-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.scenario-card { min-height: 88px; padding: 15px; border-radius: 14px; }
.scenario-card b { font-size: 14px; }
.scenario-card small { font-size: 11px; }
.scenario-context-panel { gap: 12px; margin-top: 18px; padding: 17px; border: 1px solid #e2eae4; border-radius: 14px; }
.scenario-context-panel label > span { font-size: 12px; }
.scenario-context-panel input, .scenario-context-panel select { height: 46px; font-size: 13px; }
.scenario-hint { font-size: 12px; line-height: 1.65; }

.topic-field > span { font-size: 13px; }
.topic-field input { height: 62px; font-size: 18px; border-radius: 14px; }
.prompt-starters { flex-wrap: wrap; gap: 9px; }
.prompt-starters > span, .prompt-starters button { font-size: 12px; }
.goal-heading > div strong { font-size: 15px; }
.goal-heading > div span { font-size: 12px; }
.goal-input { min-height: 156px; font-size: 15px; }
.ai-content-field > span b { font-size: 14px; }
.ai-content-field > span small, .ai-content-field > em, .ai-content-status { font-size: 11px; }
.ai-content-grid .goal-input { min-height: 190px; }
.goal-footer { font-size: 11px; }
.material-upload-block { padding: 17px; }
.material-dropzone {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 94px;
  padding: 17px 19px;
  border: 1px dashed #9fbea9;
  border-radius: 14px;
  background: linear-gradient(135deg, #f3f8f4, #fffaf9);
  cursor: pointer;
}
.material-dropzone:hover { border-color: var(--sage-700); background: #f0f7f2; }
.material-dropzone input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.material-upload-icon { display: grid; place-items: center; flex: 0 0 auto; width: 42px; height: 42px; border-radius: 13px; color: #fff; background: var(--sage-700); font-size: 24px; }
.material-dropzone b, .material-dropzone small { display: block; }
.material-dropzone b { font-size: 14px; }
.material-dropzone small { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.material-status-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 11px; }
.material-upload-status { flex: 1; padding: 10px 12px; border-radius: 10px; color: var(--muted); background: #f2f5f3; font-size: 12px; }
.material-upload-status.is-loading { color: #7a5e25; background: #fff5dc; }
.material-upload-status.is-ready { color: var(--sage-700); background: var(--sage-100); }
.material-upload-status.has-warning { color: #916529; background: #fff3dc; }
.material-file-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.material-file-chip { display: inline-flex; align-items: center; gap: 7px; max-width: 100%; padding: 7px 10px; border: 1px solid #d7e4db; border-radius: 999px; background: #fff; }
.material-file-chip b { overflow: hidden; max-width: 260px; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.material-file-chip small { color: var(--muted); font-size: 10px; }
.material-file-chip.is-failed { border-color: #edc6c8; background: #fff6f6; }
.material-usage-row { display: flex; align-items: end; justify-content: space-between; gap: 14px; margin-top: 14px; }
.material-usage-row label { flex: 1; }
.material-usage-row label > span { display: block; margin-bottom: 6px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.material-usage-row select { width: 100%; height: 43px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; }
.text-button { min-height: 43px; padding: 0 12px; border: 0; color: var(--danger); background: transparent; font-weight: 700; }
.materials-field { padding: 0 17px 17px; } .style-picker-field > .setting-label { display: block; margin-bottom: 8px; color: var(--ink-soft); font-size: 12px; font-weight: 700; }
.style-picker-field { min-width: 0; }
.style-choice-button {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 70px;
  padding: 13px 15px;
  border: 1px solid #b8cdbd;
  border-radius: 13px;
  color: var(--ink);
  background: linear-gradient(135deg, #fff, #f2f7f3);
  text-align: left;
  box-shadow: 0 7px 18px rgba(42,72,55,.045);
}
.style-choice-button:hover { border-color: var(--sage-700); box-shadow: 0 10px 24px rgba(42,72,55,.08); }
.style-choice-button span, .style-choice-button b, .style-choice-button small { display: block; min-width: 0; }
.style-choice-button b { font-size: 14px; }
.style-choice-button small { margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 10px; line-height: 1.45; text-overflow: ellipsis; white-space: nowrap; }
.style-choice-button em { padding: 7px 10px; border-radius: 999px; color: var(--sage-700); background: var(--sage-100); font-size: 10px; font-style: normal; font-weight: 900; white-space: nowrap; }

.visual-repair-card label > span, .visual-repair-card label > small { font-size: 11px; }
.visual-repair-card input, .visual-repair-card textarea, .visual-repair-card select { font-size: 13px; }

.style-library-dialog {
  width: min(1080px, 90vw);
  max-width: none;
  max-height: 90vh;
  padding: 0;
  overflow: hidden;
  border: 1px solid #c7d6cc;
  border-radius: 22px;
  background: #f6f9f6;
  box-shadow: 0 32px 100px rgba(24,48,35,.25);
}
.style-library-dialog::backdrop { background: rgba(26,43,34,.48); backdrop-filter: blur(6px); }
.style-library-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 23px 26px; border-bottom: 1px solid var(--line); background: #fff; }
.style-library-head span, .style-library-head strong, .style-library-head p { display: block; }
.style-library-head span { color: var(--sage-700); font-size: 11px; font-weight: 900; letter-spacing: .08em; }
.style-library-head strong { margin-top: 5px; font-size: 20px; }
.style-library-head p { margin: 5px 0 0; color: var(--muted); font-size: 12px; }
.style-library-head button { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--line); border-radius: 11px; color: var(--ink-soft); background: #fff; font-size: 22px; }
.style-library-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; max-height: calc(90vh - 112px); padding: 20px; overflow: auto; }
.style-library-card { position: relative; display: grid; grid-template-columns: 124px minmax(0, 1fr); gap: 14px; min-height: 142px; padding: 13px; border: 1px solid var(--line); border-radius: 15px; color: var(--ink); background: #fff; text-align: left; box-shadow: 0 7px 20px rgba(43,70,54,.045); }
.style-library-card:hover { border-color: var(--sage-300); transform: translateY(-1px); }
.style-library-card.is-selected { border-color: var(--sage-700); box-shadow: 0 0 0 2px rgba(49,95,73,.12); }
.style-library-card-auto { background: linear-gradient(135deg, #f2f8f3, #fff8f6); }
.style-library-card mark { position: absolute; top: 10px; right: 10px; padding: 4px 7px; border-radius: 999px; color: var(--sage-700); background: var(--sage-100); font-size: 9px; font-weight: 900; }
.style-swatch { position: relative; display: block; min-height: 114px; overflow: hidden; border-radius: 11px; background: linear-gradient(145deg, #e8f1eb, #f5dfdd); }
.style-swatch i, .style-swatch b, .style-swatch em { position: absolute; display: block; border-radius: 999px; background: rgba(255,255,255,.82); }
.style-swatch i { left: 13px; right: 13px; top: 17px; height: 10px; }
.style-swatch b { left: 13px; right: 34px; top: 37px; height: 7px; }
.style-swatch em { left: 13px; right: 17px; bottom: 16px; height: 42px; border-radius: 9px; background: rgba(255,255,255,.66); }
.style-card-copy { min-width: 0; align-self: center; }
.style-card-copy small, .style-card-copy strong, .style-card-copy p, .style-card-copy em { display: block; }
.style-card-copy small { color: var(--muted); font-size: 9px; font-weight: 800; }
.style-card-copy strong { margin-top: 5px; font-size: 15px; }
.style-card-copy p { margin: 7px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.55; }
.style-card-copy em { margin-top: 7px; color: var(--sage-700); font-size: 10px; font-style: normal; font-weight: 700; }
.style-swatch[data-style-swatch="swiss-minimal"] { background: linear-gradient(135deg, #f8f8f5 0 68%, #df554e 68%); }
.style-swatch[data-style-swatch="soft-rounded"] { background: linear-gradient(145deg, #dceee2, #f7dedf); }
.style-swatch[data-style-swatch="glassmorphism"] { background: linear-gradient(145deg, #534f8d, #86b8c9); }
.style-swatch[data-style-swatch="dark-tech"] { background: linear-gradient(145deg, #101a28, #164d54); }
.style-swatch[data-style-swatch="blueprint"] { background: linear-gradient(145deg, #164b77, #2e78a5); }
.style-swatch[data-style-swatch="editorial"] { background: linear-gradient(135deg, #f6f1e8 0 70%, #1f2925 70%); }
.style-swatch[data-style-swatch="photo-editorial"] { background: linear-gradient(145deg, #26332d 0 52%, #d7a67c 52%); }
.style-swatch[data-style-swatch="data-journalism"] { background: linear-gradient(145deg, #e7edf0, #f1c867); }
.style-swatch[data-style-swatch="chalkboard"] { background: linear-gradient(145deg, #183c31, #2c5847); }
.style-swatch[data-style-swatch="sketch-notes"] { background: linear-gradient(145deg, #fffdf7, #f1d6a8); }
.style-swatch[data-style-swatch="ink-notes"] { background: linear-gradient(145deg, #f5f0e5, #d6d0c2); }
.style-swatch[data-style-swatch="ink-wash"] { background: linear-gradient(145deg, #f1f2ef, #9ca59f); }
.style-swatch[data-style-swatch="brutalist"] { background: linear-gradient(135deg, #f1ed42 0 52%, #161616 52%); }
.style-swatch[data-style-swatch="memphis"] { background: linear-gradient(145deg, #f8d7dc, #89c6bd); }
.style-swatch[data-style-swatch="paper-cut"] { background: linear-gradient(145deg, #f4b8a9, #98c9ad); }
.style-swatch[data-style-swatch="pixel-art"] { background: linear-gradient(135deg, #292842 0 50%, #71b6a0 50%); image-rendering: pixelated; }
.style-swatch[data-style-swatch="vintage-poster"] { background: linear-gradient(145deg, #b84e3d, #e7c36c); }
.style-swatch[data-style-swatch="zine"] { background: linear-gradient(135deg, #efefea 0 48%, #e64973 48% 58%, #202020 58%); }

@media (max-width: 1450px) {
  .scenario-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .style-library-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  html,
  body {
    min-width: 0;
  }

  .auth-screen {
    min-height: 100dvh;
    padding: 20px 14px;
    overflow: auto;
  }

  .auth-shell {
    display: block;
    width: min(520px, 100%);
    height: auto;
    min-height: 0;
    margin: auto;
  }

  .auth-intro {
    min-height: 0;
    padding: 28px 26px 24px;
  }

  .auth-value {
    margin-top: 28px;
  }

  .auth-value h1 {
    max-width: none;
    font-size: 30px;
  }

  .auth-value > p {
    max-width: none;
    font-size: 13px;
  }

  .auth-feature-list {
    gap: 10px;
    margin-top: 20px;
  }

  .auth-deck-preview,
  .auth-intro-footer {
    display: none;
  }

  .auth-panel {
    padding: 30px 26px 28px;
  }

  .auth-copy {
    padding-bottom: 26px;
  }

  .auth-security-note {
    margin-top: 28px;
    padding-top: 20px;
  }
}

@media (max-width: 520px) {
  .auth-screen {
    padding: 12px 10px;
  }

  .auth-intro,
  .auth-panel {
    padding-left: 20px;
    padding-right: 20px;
  }

  .auth-brand strong {
    font-size: 16px;
  }

  .auth-value h1 {
    font-size: 26px;
  }

  .auth-code-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .auth-code-button {
    width: 100%;
  }
}

.audit-model-setting { display: grid; gap: 8px; margin: 14px 0; font-size: 13px; }
.audit-model-setting select { width: 100%; padding: 10px; border: 1px solid #c6dace; border-radius: 10px; background: white; color: inherit; }
.audit-model-setting.is-hidden { display: none; }
.visual-audit-suggestions { padding-left: 20px; font-size: 13px; line-height: 1.65; }
.visual-audit-suggestions li + li { margin-top: 10px; }

/* 预览使用独立工作区，页数只影响缩略图列表，不再推走画布和修改入口。 */
html:has(body.is-visual-workspace), body.is-visual-workspace { min-width: 0; }
body.is-visual-workspace { overflow: hidden; }
.is-visual-workspace .app-shell { display: flex; flex-direction: column; height: 100dvh; min-height: 0; }
.is-visual-workspace .topbar { position: static; flex: none; }
.is-visual-workspace .studio-layout { display: flex; flex-direction: column; flex: 1; width: 100%; min-height: 0; margin: 0; padding: 10px 20px 16px; }
.is-visual-workspace .workspace-tabs { position: static; flex: none; padding: 4px; border-radius: 12px; }
.is-visual-workspace .workspace-tab small, .is-visual-workspace .workspace-live-strip { display: none; }
.is-visual-workspace [data-workspace-tab="create"]:not(.is-active) em { display: none; }
.is-visual-workspace .task-context { display: none; }
.is-visual-workspace .workspace-panels { display: flex; flex-direction: column; flex: 1; min-height: 0; margin-top: 12px; }
.is-visual-workspace [data-workspace-panel="visual"].is-active { display: flex; flex-direction: column; flex: 1; min-height: 0; padding-top: 0; }
.visual-workspace-heading { flex: none; gap: 16px; margin-bottom: 12px; }
.visual-workspace-heading > div:first-child { min-width: 0; }
.visual-workspace-heading h3 { overflow: hidden; margin: 3px 0 0; font-size: 18px; text-overflow: ellipsis; white-space: nowrap; }
.visual-workspace-heading .eyebrow { font-size: 10px; }
.visual-workspace-actions { display: flex; flex: none; align-items: center; gap: 10px; }
.visual-workspace-actions > span { max-width: 180px; color: var(--muted); font-size: 12px; }
.visual-workspace-actions button { min-height: 38px; padding: 8px 14px; font-size: 13px; }
.visual-gate { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.is-visual-workspace .visual-empty { flex: 1; min-height: 0; overflow: auto; }
.visual-page-rail { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.85); }
.visual-rail-heading { display: flex; flex: none; align-items: center; justify-content: space-between; padding: 13px 12px 8px; font-size: 12px; }
.visual-rail-heading span { color: var(--muted); font-size: 11px; }
.visual-page-rail .visual-media-status { display: none; }
.visual-preview-card span b { font-size: 11px; }
.visual-canvas-toolbar { display: flex; justify-content: center; align-items: center; gap: 10px; }
.visual-canvas-toolbar button { min-height: 34px; padding: 6px 12px; font-size: 12px; }
.visual-canvas-toolbar > span { min-width: 55px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; }
.visual-canvas-column .preview-caption { overflow: hidden; margin: 0; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.visual-tools-heading { display: flex; flex: none; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.visual-tool-tabs { display: flex; gap: 6px; }
.visual-tool-tabs button { min-height: 38px; padding: 8px 10px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); font-size: 13px; }
.visual-tool-tabs [aria-selected="true"] { color: var(--sage-700); background: var(--sage-50); font-weight: 700; }
.visual-tool-panel { flex: 1; min-height: 0; }
.visual-repair-card.visual-tool-panel { display: flex; flex-direction: column; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
.visual-repair-fields { flex: 1; min-height: 0; padding: 18px 16px; overflow-y: auto; }
.visual-repair-scope { display: flex; align-items: center; gap: 8px; }
.visual-repair-scope strong { flex: 1; font-size: 15px; overflow-wrap: anywhere; }
.visual-repair-scope button { flex: none; margin: 0; padding: 5px; border: 0; border-radius: 5px; color: var(--sage-700); background: var(--sage-50); font-size: 11px; }
.visual-scope-hint { margin: 8px 0 14px; color: var(--muted); font-size: 11px; line-height: 1.5; }
.visual-repair-footer { flex: none; padding: 12px 16px 16px; border-top: 1px solid var(--line); background: #fff; }
.visual-repair-footer button { min-height: 42px; margin: 0; font-size: 14px; }
.visual-repair-footer .repair-progress { margin: 0 0 10px; max-height: 90px; overflow: auto; }
.repair-progress.is-success { color: var(--sage-700); background: var(--sage-50); }
.visual-audit-panel { padding: 16px; overflow-y: auto; }
.visual-audit-panel > button { margin: 12px 0; font-size: 13px; }
.visual-assets-details { margin-top: 20px; font-size: 12px; color: var(--ink-soft); }
.visual-assets-details summary { cursor: pointer; }
.visual-assets-details .visual-gate-head { margin-top: 12px; padding: 12px; box-shadow: none; }
.visual-assets-details .generated-assets { margin: 12px 0 0; padding: 10px; }
.visual-assets-details .generated-assets-grid { grid-template-columns: 1fr; }
.visual-review-panel > #approveVisualButton { flex: none; width: auto; margin: 10px 16px; font-size: 12px; }
.visual-audit-progress { margin: 10px 0 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.visual-audit-suggestions { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.visual-audit-suggestions li { padding: 10px 11px; border: 1px solid #eadfce; border-radius: 10px; background: #fffaf4; color: var(--ink-soft); font-size: 11px; line-height: 1.55; }
.visual-audit-suggestion-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 5px; color: var(--sage-700); font-weight: 800; }
.visual-audit-suggestion-action { flex: none; padding: 3px 7px; border: 1px solid #c6dace; border-radius: 999px; color: var(--sage-700); background: #f6fbf6; font-size: 10px; cursor: pointer; }
.visual-open-tools, .visual-close-tools { display: none; }
.is-visual-workspace :is(button, input, textarea, select, summary):focus-visible { outline: 2px solid var(--sage-700); outline-offset: 3px; }

@media (max-width: 1100px) {
  .visual-layout { grid-template-columns: 136px minmax(0, 1fr); }
  .visual-open-tools, .visual-close-tools { display: block; }
  .visual-close-tools { padding: 8px; border: 0; border-radius: 8px; color: var(--ink-soft); background: var(--sage-50); font-size: 12px; }
  .visual-review-panel { position: fixed; inset: 0 0 0 auto; width: min(400px, 100%); height: 100dvh; max-height: 100dvh; border-radius: 16px 0 0 16px; }
  .visual-review-panel::backdrop { background: rgba(28,45,35,.35); }
  .is-visual-workspace .workspace-tab b { font-size: 13px; }
  .is-visual-workspace .workspace-tab em { display: none; }
}
@media (max-width: 600px) {
  .is-visual-workspace .topbar { height: 56px; padding: 0 14px; }
  .is-visual-workspace .brand-lockup { gap: 6px; }
  .is-visual-workspace .brand-lockup strong { font-size: 15px; }
  .is-visual-workspace .brand-mark { width: 26px; height: 26px; }
  .is-visual-workspace .topbar-actions { gap: 6px; }
  .is-visual-workspace .connection-status, .is-visual-workspace .user-session span { display: none; }
  .is-visual-workspace .studio-layout { padding: 6px 10px 10px; }
  .is-visual-workspace .workspace-tab { display: flex; justify-content: center; min-height: 36px; padding: 6px 2px; }
  .is-visual-workspace .workspace-tab > span:first-child { display: none; }
  .is-visual-workspace .workspace-tab b { font-size: 11px; }
  .visual-workspace-heading { flex-wrap: wrap; gap: 8px; }
  .visual-workspace-heading h3 { max-width: calc(100vw - 24px); font-size: 16px; }
  .visual-workspace-heading .eyebrow { display: none; }
  .visual-workspace-actions { width: 100%; gap: 8px; }
  .visual-workspace-actions > span { flex: 1; font-size: 11px; }
  .visual-workspace-actions button { padding: 8px 10px; font-size: 12px; }
  .visual-layout { grid-template-columns: 90px minmax(0, 1fr); gap: 8px; }
  .visual-preview-grid { padding: 5px; scrollbar-gutter: auto; }
  .visual-rail-heading { padding: 10px 7px 6px; font-size: 11px; }
  .visual-main-frame { padding: 4px; border-radius: 10px; }
  .visual-canvas-toolbar { flex-wrap: wrap; gap: 6px; }
  .visual-canvas-toolbar button { min-height: 36px; padding: 6px 8px; font-size: 11px; }
  .visual-canvas-toolbar > span { min-width: 36px; font-size: 11px; }
}

.optional-review-setting { display: flex; align-items: flex-start; gap: 12px; margin: 16px; padding: 14px; border: 1px solid #c6dace; border-radius: 12px; background: #fff; }
.optional-review-setting input { flex: 0 0 auto; margin-top: 3px; accent-color: #315e49; }
.optional-review-setting b, .optional-review-setting small { display: block; }
.optional-review-setting b { font-size: 14px; }
.optional-review-setting small { margin-top: 6px; font-size: 12px; line-height: 1.65; color: #617368; }
#reviewModelSetting { margin: 0 16px 16px; }


/* 创建表单属于新草稿，旧任务进度只在该任务的工作区展示。 */
html:has(body.is-create-workspace), body.is-create-workspace { min-width: 0; }
.is-create-workspace .studio-layout { padding: 16px 0 40px; }
.is-create-workspace .workspace-tabs { position: static; padding: 4px; border-radius: 12px; box-shadow: none; }
.is-create-workspace .workspace-tab small, .is-create-workspace .workspace-tab em,
.is-create-workspace .tab-badges, .is-create-workspace .workspace-live-strip, .is-create-workspace .task-context { display: none; }
.is-create-workspace .workspace-panels { margin-top: 0; }
.is-create-workspace [data-workspace-panel="create"] { padding-top: 20px; }
.create-heading { margin: 0 0 20px; }
.create-heading h1 { margin: 0; font-size: 27px; font-weight: 750; letter-spacing: -.6px; line-height: 1.4; }
.create-heading p { margin: 7px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.create-composer { padding: 24px 28px 0; border: 1px solid var(--line-strong); border-radius: 18px; background: #fff; box-shadow: 0 12px 35px rgba(35,61,48,.045); }
.create-composer .topic-field > span { display: flex; align-items: center; justify-content: space-between; }
.create-composer .topic-field em { color: var(--muted); font-size: 11px; font-weight: 400; font-style: normal; }
.create-composer .topic-field input { height: 58px; background: #f8faf8; font-size: 16px; }
.create-composer .prompt-starters { flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.create-composer .prompt-starters button { padding: 3px 8px; border-color: transparent; background: transparent; text-align: left; }
.create-composer .prompt-starters button:hover { background: var(--sage-50); }
.setting-label { display: block; margin-bottom: 8px; color: var(--ink-soft); font-size: 12px; font-weight: 650; }
.creation-scenario { margin-top: 22px; }
.create-composer .scenario-grid { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.create-composer .scenario-card { display: block; min-height: 34px; padding: 7px 13px; border-radius: 8px; background: #fff; font-size: 12px; font-weight: 500; }
.create-composer .scenario-card.is-selected { color: var(--sage-700); background: var(--sage-100); border-color: var(--sage-300); font-weight: 700; box-shadow: none; }
.creation-basics { display: grid; grid-template-columns: 92px minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin: 20px 0 24px; }
.creation-basics > *, .creation-models > * { min-width: 0; }
.creation-basics input, .creation-basics select, .creation-models select { width: 100%; min-width: 0; height: 44px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: 9px; color: var(--ink); background: #fff; font-size: 12px; text-overflow: ellipsis; }
.create-composer .style-choice-button { grid-template-columns: minmax(0, 1fr) auto; min-height: 44px; height: 44px; padding: 0 12px; gap: 10px; border-color: var(--line-strong); border-radius: 9px; background: #fff; box-shadow: none; }
.create-composer .style-choice-button b { overflow: hidden; font-size: 12px; font-weight: 500; white-space: nowrap; text-overflow: ellipsis; }
.create-composer .style-choice-button em { padding: 0; border-radius: 0; background: none; font-size: 11px; }
.creation-disclosure { border-top: 1px solid var(--line); }
.creation-disclosure > summary { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 12px 0; color: var(--ink); font-size: 13px; cursor: pointer; list-style: none; }
.creation-disclosure > summary::-webkit-details-marker { display: none; }
.creation-disclosure > summary > small { flex: 1; color: var(--muted); font-size: 11px; }
.creation-disclosure > summary i { margin-left: auto; color: var(--sage-700); font-size: 11px; font-style: normal; }
.creation-disclosure > summary i::after { content: "展开 ＋"; }
.creation-disclosure[open] > summary i::after { content: "收起 −"; }
.creation-disclosure:not([open]) > .creation-disclosure-body { display: none; }
.creation-disclosure-body { padding: 2px 0 20px; }
.create-composer .scenario-context-panel { margin: 0; padding: 0; border: 0; background: transparent; }
.create-composer .scenario-hint { font-size: 11px; }
.create-composer .goal-heading { margin-top: 18px; padding-top: 16px; }
.create-composer .ai-content-field > span { min-height: 36px; }
.create-composer .ai-content-grid .goal-input { min-height: 125px; font-size: 13px; }
.create-composer .material-upload-block { padding: 16px 0 0; }
.create-composer .material-dropzone { min-height: 80px; padding: 14px; }
.creation-models { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.creation-switch { display: flex; align-items: flex-start; gap: 10px; margin-top: 20px; }
.creation-switch input, .creation-outline-choice input { flex: none; margin: 3px 0 0; accent-color: var(--sage-700); }
.creation-switch b, .creation-switch small { display: block; }
.creation-switch b { font-size: 13px; font-weight: 600; }
.creation-switch small { margin-top: 4px; color: var(--ink-soft); font-size: 12px; line-height: 1.6; }
.creation-actions { position: sticky; z-index: 10; bottom: 0; display: flex; align-items: center; gap: 14px; margin: 6px -28px 0; padding: 18px 28px; border-top: 1px solid var(--line); border-radius: 0 0 18px 18px; background: #fff; box-shadow: 0 -7px 18px rgba(35,61,48,.025); }
.creation-action-copy { flex: 1; min-width: 0; }
.creation-outline-choice { display: flex; align-items: start; gap: 8px; font-size: 12px; }
.creation-action-copy p { margin: 6px 0 0 21px; color: var(--ink-soft); font-size: 11px; line-height: 1.4; }
.creation-actions .primary-button { justify-content: center; min-width: 160px; min-height: 44px; font-size: 14px; }
.creation-actions .ghost-button { padding: 10px 5px; font-size: 12px; }
.is-create-workspace :is(button, summary):focus-visible, .material-dropzone:focus-within { outline: 2px solid var(--sage-700); outline-offset: 3px; }
@media (max-width: 640px) {
  .is-create-workspace .topbar { padding: 0 14px; height: 56px; }
  .is-create-workspace .brand-lockup strong { font-size: 15px; }
  .is-create-workspace .brand-mark { width: 28px; height: 28px; }
  .is-create-workspace .topbar-actions { gap: 8px; }
  .is-create-workspace .user-session span { display: none; }
  .is-create-workspace .studio-layout { width: calc(100% - 24px); padding-top: 12px; }
  .is-create-workspace .workspace-tab { display: flex; justify-content: center; min-height: 36px; padding: 6px 2px; }
  .is-create-workspace .workspace-tab > span:first-child { display: none; }
  .is-create-workspace .workspace-tab b { font-size: 11px; }
  .is-create-workspace [data-workspace-panel="create"] { padding-top: 16px; }
  .create-heading { margin-bottom: 16px; }
  .create-heading h1 { font-size: 22px; }
  .create-heading p { font-size: 12px; }
  .create-composer { padding: 16px 16px 0; border-radius: 14px; }
  .create-composer .topic-field input { padding: 0 12px; font-size: 14px; }
  .create-composer .prompt-starters { display: none; }
  .creation-scenario { margin-top: 16px; }
  .create-composer .scenario-grid { gap: 7px; }
  .create-composer .scenario-card { padding: 7px 9px; min-height: 36px; }
  .creation-basics { grid-template-columns: 76px minmax(0, 1fr); gap: 12px; margin: 16px 0; }
  .creation-basics > label:last-child { grid-column: 1 / -1; }
  .creation-disclosure > summary { gap: 8px; }
  .creation-disclosure > summary small { font-size: 10px; }
  .create-composer .scenario-context-panel, .creation-models, .create-composer .ai-content-grid { grid-template-columns: minmax(0, 1fr); }
  .create-composer .goal-heading { gap: 10px; }
  .create-composer .goal-heading > div > span { display: none; }
  .create-composer .material-file-chip { max-width: 100%; overflow-wrap: anywhere; }
  .creation-actions { flex-wrap: wrap; gap: 12px; margin: 6px -16px 0; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); border-radius: 0 0 14px 14px; }
  .creation-action-copy { flex-basis: 100%; }
  .creation-actions .primary-button { flex: 1; }
}
