/* v79 personal co-creation. Load after the existing brand/design styles. */
html[data-zs-experience=studio] { --zs-action: var(--ds-action); --zs-on-action: var(--ds-on-action); --zs-gap: 24px; }
html[data-zs-experience=studio][data-zs-accent=blue] { --ds-action: #315ca5; --ds-on-action: #fff; }
html[data-zs-experience=studio][data-zs-accent=rose] { --ds-action: #98425e; --ds-on-action: #fff; }
html[data-theme=dark][data-zs-experience=studio][data-zs-accent=blue] { --ds-action: #adc5fb; --ds-on-action: #192842; }
html[data-theme=dark][data-zs-experience=studio][data-zs-accent=rose] { --ds-action: #f3b2ca; --ds-on-action: #3b202c; }
html[data-zs-density=compact] { --zs-gap: 16px; }
.zs-dialog, .zs-work, .zs-skill-tools, .zs-result, .zs-settings-entry { letter-spacing: 0; }
.icon-circle-dot { --ui-icon: url('/vendor/lucide/circle-dot.svg'); }
.icon-circle-user-round { --ui-icon: url('/vendor/lucide/circle-user-round.svg'); }
.icon-undo-2 { --ui-icon: url('/vendor/lucide/undo-2.svg'); }
.icon-redo-2 { --ui-icon: url('/vendor/lucide/redo-2.svg'); }
.icon-trash-2 { --ui-icon: url('/vendor/lucide/trash-2.svg'); }
.zs-dialog *, .zs-work *, .zs-result * { box-sizing: border-box; min-width: 0; }
.zs-dialog [hidden], .zs-work[hidden], .zs-home .zs-home-hidden { display: none !important; }
[data-surface=app] .page.zs-home { flex-direction: column; gap: 0; }
[data-surface=app] .page.active.zs-home { display: flex; }
.zs-home > .page-title, .zs-home > #consentNotice { order: -1; }
.zs-home > [data-zs-home] { order: var(--zs-order, 1); }
.zs-home > .section-block { margin-block: var(--zs-gap, 24px); }
.zs-work { margin: 0 -18px var(--zs-gap, 24px); padding: 16px 18px 20px; border-block: 1px solid var(--ds-border); background: color-mix(in srgb,var(--ds-surface) 52%,transparent); }
.zs-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.zs-section-head h2 { margin: 0; font-size: 15px; line-height: 1.5; }
.zs-section-head > .zs-button { color: var(--ds-action); padding-inline: 8px; }
.zs-state { display: flex; align-items: center; gap: 12px; margin-block: 14px 18px; }
.zs-state img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.zs-state > div { flex: 1; }
.zs-state strong { font-size: 16px; }
.zs-state strong, .conversation-heading h1, .response-byline { overflow-wrap: anywhere; }
.zs-focus { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-block: 12px; }
.zs-focus > strong { flex: 1 1 160px; font-size: 17px; line-height: 1.6; overflow-wrap: anywhere; }
.zs-focus > .zs-meta { flex-basis: 100%; }
.zs-focus > .zs-artifact-row { border-bottom: 0; }
.zs-welcome { padding-block: 12px 20px; margin-bottom: 8px; border-bottom: 1px solid var(--ds-border); }
.zs-welcome h3 { font-size: 18px; line-height: 1.7; margin: 0 0 8px; }
.zs-welcome > .zs-button { color: var(--ds-action); }
.zs-identity { display: grid; grid-template-columns: 80px minmax(0, 1fr); align-items: center; gap: 12px 18px; padding-bottom: 24px; margin-bottom: 24px; border-bottom: 1px solid var(--ds-border); }
.zs-portrait { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; }
.zs-identity > .zs-inline-actions, .zs-identity > .zs-meta, .zs-identity > .zs-crop { grid-column: 1 / -1; margin: 0; }
.zs-crop { display: grid; grid-template-columns: minmax(100px, 180px) minmax(0, 1fr); gap: 16px; padding-block: 12px; }
.zs-crop-preview { display: block; width: 100%; aspect-ratio: 1; border-radius: 8px; }
.zs-crop-controls { display: grid; gap: 6px; }
.zs-crop-controls input[type=range] { width: 100%; min-width: 0; padding: 0; min-height: 28px; accent-color: var(--ds-action); }
.zs-personal-layout { border-top: 1px solid var(--ds-border); margin-top: 24px; padding-top: 16px; }
.zs-personal-layout > summary { cursor: pointer; min-height: 44px; font-size: 15px; font-weight: 600; }
.feed-more { width: 100%; border-top: 1px solid var(--ds-border); margin-top: 12px; }
.feed-more > summary { cursor: pointer; padding: 14px 4px; color: var(--ds-muted); font-size: 14px; min-height: 48px; }
.feed-remainder { display: grid; gap: 12px; }
.skill-contract { border-block: 1px solid var(--ds-border); margin: 8px 0; padding: 12px 0; }
.skill-contract > div { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 12px; padding: 5px 0; font-size: 14px; line-height: 1.7; }
.skill-contract dt { color: var(--ds-muted); }
.skill-contract dd { margin: 0; overflow-wrap: anywhere; }
.history-scope { padding-block: 16px; }
.zs-state-text { display: block; font-size: 12px; line-height: 1.6; color: var(--ds-muted); }
.zs-state[data-busy=true] .zs-state-text { color: var(--ds-info); }
.zs-button { display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 44px; min-width: 44px; padding: 9px 12px; border: 1px solid transparent; border-radius: 6px; font-size: 14px; line-height: 1.5; font-weight: 600; color: var(--ds-text); background: transparent; overflow-wrap: anywhere; text-align: center; touch-action: manipulation; cursor: pointer; }
.zs-button:hover:not(:disabled) { background: var(--ds-surface-soft); }
.zs-button:focus-visible { outline: 2px solid var(--ds-info); outline-offset: 2px; }
.zs-button:disabled { opacity: .5; cursor: default; }
.zs-button .ui-icon { width: 18px; height: 18px; flex: 0 0 18px; }
.zs-button > .z-sign { width: 20px; height: 20px; color: var(--ds-action); }
.zs-icon-button { width: 44px; height: 44px; padding: 0; flex: 0 0 44px; }
.zs-close > .ui-icon { transform: rotate(45deg); }
.zs-primary { background: var(--ds-action); color: var(--ds-on-action); border-color: var(--ds-action); }
.zs-primary:hover:not(:disabled) { background: var(--ds-action); filter: brightness(.94); }
.zs-shortcuts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.zs-shortcuts .zs-button { border-color: var(--ds-border); background: var(--ds-surface); font-size: 13px; }
.zs-shortcuts .zs-button:nth-child(3n+1) > i { color: var(--ds-action); }
.zs-shortcuts .zs-button:nth-child(3n+2) > i { color: var(--ds-info); }
.zs-shortcuts .zs-button:nth-child(3n) > i { color: #98425e; }
.zs-shortcuts .zs-button:nth-child(3n+1) > .z-sign { color: var(--ds-action); }
.zs-shortcuts .zs-button:nth-child(3n+2) > .z-sign { color: var(--ds-info); }
.zs-shortcuts .zs-button:nth-child(3n) > .z-sign { color: #98425e; }
[data-surface=app] .skill-create { grid-template-columns: minmax(0,1fr) 40px 24px; column-gap: 10px; }
[data-surface=app] .skill-create-mark { grid-column: 2; grid-row: 1 / 3; align-self: center; width: 38px; height: 38px; color: var(--ds-action); }
[data-surface=app] .skill-create > i { grid-column: 3; }
[data-theme=dark] .zs-shortcuts .zs-button:nth-child(3n) > i { color: #f3b2ca; }
.zs-artifact-row { width: 100%; justify-content: flex-start; text-align: left; gap: 12px; padding: 14px 0; border-radius: 0; border-bottom: 1px solid var(--ds-border); }
.zs-artifact-row > .ui-icon:first-child { color: var(--ds-action); }
.zs-artifact-row > .z-sign:first-child { width: 24px; height: 24px; color: var(--ds-action); }
.zs-artifact-row > .ui-icon:last-child { color: var(--ds-muted); }
.zs-artifact-text { flex: 1; overflow-wrap: anywhere; font-weight: 600; line-height: 1.7; }
.zs-meta { display: block; color: var(--ds-muted); font-size: 12px; font-weight: 400; line-height: 1.7; overflow-wrap: anywhere; }
.zs-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; color: var(--ds-muted); font-size: 13px; font-weight: 400; line-height: 1.7; }
.zs-empty { color: var(--ds-muted); font-size: 14px; padding-block: 12px; line-height: 1.8; }
[data-surface=app] .settings-group .zs-settings-entry { justify-content: flex-start; width: 100%; border-radius: 0; text-align: left; }
.zs-settings-entry > i { order: 2; margin-left: auto; }
.zs-skill-tools { display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--ds-border); padding-top: 10px; margin-top: 12px; }
.zs-skill-tools .zs-button { color: var(--ds-action); padding-inline: 6px; }
.zs-result { position: relative; margin-top: 14px; padding: 28px 0 2px; border-block: 1px solid var(--ds-border); background: color-mix(in srgb,var(--ds-surface-soft) 42%,transparent); }
.zs-result::before { position: absolute; top: 8px; left: 0; content: "已生成的成果"; color: var(--ds-action); font-size: 10px; font-weight: 750; }
.zs-result .zs-artifact-row { font-size: 14px; }
.zs-reply-actions { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.zs-reply-actions .zs-button { color: var(--ds-muted); font-size: 12px; padding-inline: 6px; }
.zs-turn-tools { display: flex; justify-content: flex-end; border-bottom: 1px solid var(--ds-border); }
.composer .zs-turn-tools .zs-button { display: inline-flex; width: auto; height: auto; min-height: 36px; border-radius: 6px; background: transparent; font-size: 12px; color: var(--ds-muted); padding: 4px 8px; }
.zs-dialog[data-view=turn] .zs-preference { margin-bottom: 20px; }
.zs-dialog { position: fixed; inset: 0; width: min(800px, calc(100% - 40px)); max-width: 100%; max-height: min(92dvh, 980px); height: auto; margin: auto; padding: 0; border: 1px solid var(--ds-border); border-radius: 8px; background: var(--ds-canvas); color: var(--ds-text); box-shadow: 0 18px 60px #0003; overflow: hidden; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Helvetica Neue", Arial, sans-serif; }
.zs-dialog[open] { display: flex; flex-direction: column; }
.zs-dialog::backdrop { background: #0006; }
.zs-dialog-head { display: flex; flex: 0 0 auto; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--ds-border); }
.zs-dialog h2 { margin: 0; font-size: 22px; line-height: 1.4; }
.zs-dialog h3 { margin: 0 0 12px; font-size: 16px; line-height: 1.5; }
.zs-dialog-main { padding: 16px 24px 24px; overflow-y: auto; overscroll-behavior: contain; min-height: 0; flex: 1 1 auto; }
.zs-dialog-footer { display: flex; flex: 0 0 auto; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--ds-border); padding: 12px 24px max(12px, env(safe-area-inset-bottom)); background: var(--ds-canvas); }
.zs-status { margin: 0; padding: 10px 24px 0; color: var(--ds-muted); font-size: 13px; line-height: 1.6; flex: 0 0 auto; overflow-wrap: anywhere; }
.zs-status:empty { display: none; }
.zs-error { color: var(--ds-danger); }
.zs-preference-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px 28px; }
.zs-preference, .zs-preference-section { padding: 0; border: 0; margin: 0; min-width: 0; }
.zs-preference legend, .zs-preference-section legend { font-size: 14px; font-weight: 600; margin-bottom: 10px; line-height: 1.6; }
.zs-preference-section { margin-top: 24px; }
.zs-segments { display: flex; border: 1px solid var(--ds-border); border-radius: 8px; padding: 3px; background: var(--ds-surface-soft); }
.zs-segments .zs-button { flex: 1 1 0; padding-inline: 5px; font-size: 13px; }
.zs-segments .zs-button[aria-pressed=true] { color: var(--ds-action); background: var(--ds-surface); border-color: var(--ds-action); }
.zs-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.zs-swatches .zs-button { flex: 1 1 0; flex-direction: column; padding: 6px; gap: 5px; font-size: 12px; }
.zs-swatches .zs-button[aria-pressed=true] { border-color: var(--ds-action); background: var(--ds-surface); }
.zs-swatch { width: 28px; height: 22px; display: block; border-radius: 4px; background: #28664e; }
.zs-swatch[data-color=blue] { background: #315ca5; }
.zs-swatch[data-color=rose] { background: #98425e; }
.zs-example { border-left: 2px solid var(--ds-info); padding: 4px 16px; margin: 26px 0; }
.zs-example h3 { font-size: 13px; color: var(--ds-info); }
.zs-example p { font-size: 15px; line-height: 1.85; margin: 8px 0; }
.zs-example .zs-example-question { color: var(--ds-muted); font-size: 13px; }
.zs-checks { display: flex; flex-wrap: wrap; gap: 16px; }
.zs-check { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 1.6; color: var(--ds-text); font-weight: 400; min-height: 44px; }
.zs-dialog input[type=checkbox] { width: 20px; height: 20px; min-height: 20px; flex: 0 0 20px; padding: 0; margin: 0; accent-color: var(--ds-action); }
.zs-order-row { display: flex; align-items: center; gap: 4px; border-bottom: 1px solid var(--ds-border); min-height: 52px; }
.zs-order-row .zs-check { flex: 1; }
.zs-library-tools { display: flex; align-items: center; gap: 8px; }
.zs-field { display: grid; gap: 8px; color: var(--ds-muted); font-size: 13px; line-height: 1.6; font-weight: 500; }
.zs-dialog .zs-input { width: 100%; min-width: 0; min-height: 44px; border: 1px solid var(--ds-border); border-radius: 6px; background: var(--ds-surface); color: var(--ds-text); font-size: 16px; line-height: 1.65; padding: 10px 12px; font-family: inherit; letter-spacing: 0; }
.zs-input:focus { border-color: var(--ds-action); }
.zs-dialog textarea.zs-input { resize: vertical; min-height: 96px; }
.zs-dialog textarea.zs-body-editor { min-height: 230px; }
.zs-editor-fields { display: grid; gap: 16px; }
.zs-editor-tools, .zs-inline-actions, .zs-export { display: flex; flex-wrap: wrap; gap: 8px; margin-block: 10px; }
.zs-editor-tools .zs-button { border-color: var(--ds-border); }
.zs-refine { padding-block: 24px; border-block: 1px solid var(--ds-border); margin-top: 16px; }
.zs-refine > .zs-button { margin-top: 12px; border-color: var(--ds-border); color: var(--ds-action); }
.zs-history { padding-block: 16px; border-bottom: 1px solid var(--ds-border); }
.zs-history summary { font-size: 14px; font-weight: 600; cursor: pointer; padding-block: 6px; overflow-wrap: anywhere; }
.zs-history p { font-size: 14px; line-height: 1.8; }
.zs-version-row { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 13px; padding-top: 10px; }
.zs-table-scroll { overflow: auto; max-width: 100%; border: 1px solid var(--ds-border); border-radius: 6px; }
.zs-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.zs-table td, .zs-table th { min-width: 150px; width: 180px; padding: 5px; border-bottom: 1px solid var(--ds-border); border-right: 1px solid var(--ds-border); text-align: left; vertical-align: top; }
.zs-table th { background: var(--ds-surface-soft); }
.zs-table th .zs-input { width: calc(100% - 48px); min-width: 85px; }
.zs-table th .zs-icon-button { vertical-align: top; }
.zs-table td:last-child, .zs-table th:last-child { width: 100px; min-width: 100px; border-right: 0; }
.zs-table tr:last-child td { border-bottom: 0; }
.zs-table td .zs-input { background: var(--ds-surface); }
.zs-totals { display: grid; grid-template-columns: 1fr auto; gap: 8px 16px; font-size: 14px; }
.zs-totals dd { margin: 0; }
.zs-checklist { list-style: none; margin: 0; padding: 0; }
.zs-checklist-row { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; align-items: center; border-bottom: 1px solid var(--ds-border); padding-block: 10px; }
.zs-item-actions { display: flex; }
.zs-checklist-row > input[type=checkbox]:checked + input { text-decoration: line-through; color: var(--ds-muted); }
.zs-conflict { padding-block: 12px; margin-bottom: 16px; border-block: 1px solid var(--ds-warning); }
.zs-conflict p { color: var(--ds-warning); font-size: 14px; line-height: 1.7; margin: 0 0 8px; }
.zs-conflict .zs-button { border-color: var(--ds-border); margin-right: 6px; }
.zs-skill-current, .zs-skill-versions, .zs-skill-runs { padding-bottom: 24px; }
.zs-preserve { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; line-height: 1.8; }
.zs-run { padding-block: 16px; border-bottom: 1px solid var(--ds-border); }
.zs-run strong { font-size: 14px; }
.zs-run[data-status=failed] strong { color: var(--ds-danger); }
.zs-run[data-status=running] strong { color: var(--ds-info); }
.zs-run[data-status=completed] strong { color: var(--ds-success); }
html[data-zs-density=compact] .zs-artifact-row { padding-block: 8px; }
html[data-zs-density=compact] .zs-state { margin-block: 10px; }
html[data-zs-density=compact] .zs-home .intent-option { min-height: 76px; padding-block: 12px; }
html[data-zs-motion=reduced] *, html[data-zs-motion=reduced] *::before, html[data-zs-motion=reduced] *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
@media (max-width: 600px) {
  .zs-crop { grid-template-columns: 1fr; }
  .zs-crop-preview { width: min(220px, 100%); margin-inline: auto; }
  .zs-dialog { width: 100%; max-height: 100dvh; height: 100dvh; border: 0; border-radius: 0; }
  .zs-dialog-head { padding: max(8px, env(safe-area-inset-top)) 16px 8px; }
  .zs-dialog h2 { font-size: 20px; }
  .zs-dialog-main { padding: 16px; }
  .zs-status { padding-inline: 16px; }
  .zs-dialog-footer { padding-inline: 12px; gap: 4px; }
  .zs-preference-grid { grid-template-columns: 1fr; gap: 20px; }
  .zs-checklist-row { grid-template-columns: 24px minmax(0, 1fr); }
  .zs-item-actions { grid-column: 2; justify-content: flex-end; }
  .zs-section-head h2 { font-size: 18px; }
  .zs-shortcuts { gap: 4px; }
  .zs-shortcuts .zs-button { flex: 1 1 auto; padding-inline: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .zs-dialog *, .zs-work * { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}

/* V85: Studio editors behave as native destination pages. */
.zs-dialog[open] { animation: zsPageIn .2s cubic-bezier(.2,.75,.25,1) both; }
@keyframes zsPageIn { from { opacity: .96; transform: translateX(14px); } to { opacity: 1; transform: translateX(0); } }
.zs-dialog-head { display: grid; min-height: 64px; grid-template-columns: 44px minmax(0,1fr) 44px; align-items: center; gap: 8px; padding: 10px 16px; }
.zs-dialog-head h2 { overflow: hidden; text-align: center; text-overflow: ellipsis; white-space: nowrap; }
.zs-dialog-head-space { display: block; width: 44px; height: 44px; }
.zs-dialog-head .zs-close { display: grid; width: 44px; height: 44px; place-items: center; padding: 0; border: 0; border-radius: 50%; }
.zs-dialog-head .zs-close svg { display: block; width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.zs-dialog[data-view=preferences] .zs-dialog-main { padding-top: 0; }
.zs-dialog[data-view=preferences] .zs-identity { margin: 0; padding: 22px 0; }
.zs-dialog[data-view=preferences] .zs-preference-grid { gap: 0; border-top: 1px solid var(--ds-border); }
.zs-dialog[data-view=preferences] .zs-preference { padding: 18px 0 20px; border-bottom: 1px solid var(--ds-border); }
.zs-dialog[data-view=preferences] .zs-example { margin: 24px 0; }
.zs-dialog[data-view=preferences] .zs-personal-layout { margin-top: 0; }
.zs-dialog[data-view=preferences] .zs-segments { min-height: 52px; }
.zs-dialog[data-view=preferences] .zs-segments .zs-button { border-radius: 6px; }
.zs-dialog[data-view=preferences] .zs-dialog-footer { position: relative; }
@media (max-width: 600px) {
  .zs-dialog { max-width: none; }
  .zs-dialog-head { min-height: calc(64px + env(safe-area-inset-top)); padding: env(safe-area-inset-top) 10px 8px; background: color-mix(in srgb,var(--ds-canvas) 94%,transparent); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); }
  .zs-dialog h2 { font-size: 17px; }
  .zs-dialog-main { padding: 0 18px 28px; }
  .zs-status { padding: 8px 18px 0; }
  .zs-dialog-footer { padding: 10px 14px max(12px,env(safe-area-inset-bottom)); }
  .zs-dialog-footer .zs-primary { flex: 1 1 120px; }
  .zs-dialog[data-view=preferences] .zs-identity { grid-template-columns: 72px minmax(0,1fr); gap: 12px 16px; }
  .zs-dialog[data-view=preferences] .zs-portrait { width: 72px; height: 72px; }
  .zs-dialog[data-view=preferences] .zs-inline-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .zs-dialog[data-view=preferences] .zs-inline-actions .zs-button { min-width: 0; }
}
