.wm-dispatch-result { overflow-wrap: anywhere; min-width: 0; }
.wm-dispatch-result:empty { display: none; }
.wm-dispatch-result p { margin: .5em 0; line-height: 1.6; }
.wm-dispatch-result details { margin: .65em 0; }
.wm-dispatch-result summary { cursor: pointer; padding: .45em 0; font-weight: 600; }
.wm-dispatch-result .wm-proposal-section { border-top: 1px solid rgba(150,220,230,.3); }
.wm-proposal-row { margin: .5em 0; padding: .5em .6em; background: rgba(0,0,0,.16); border-radius: 6px; }

/* Scoped adaptation of 智造1/分层模块版.html and layout-variants.css. */
.wm-zhizao { display: grid; gap: 10px; width: 100%; color: #e4f6f8; }
.wm-zhizao .layout-bubble { min-width: 0; padding: 10px; border-radius: 9px; background: rgba(4,22,27,.84); border: 1px solid rgba(185,230,237,.25); }
.wm-zhizao h3 { display: flex; align-items: center; gap: 5px; margin: 0 0 10px; font-size: 14px; line-height: 1.4; }
.wm-zhizao h4 { font-size: 13px; margin: 8px 0; }
.wm-zhizao p { font-size: 12px; line-height: 1.65; }
.wm-zhizao .category-item { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; }
.wm-zhizao h3 .category-item { flex-direction: row; gap: 6px; font-size: 14px; }
.wm-zhizao .module-token { width: 40px; height: 40px; object-fit: contain; flex-shrink: 0; }
.wm-zhizao .xiaolan-preview { position: relative; display: flex; flex-direction: column; align-items: center; height: 220px; margin: 10px 0 0; }
.wm-zhizao .xiaolan-preview img { height: 195px; width: auto; max-width: 100%; object-fit: contain; }
.wm-zhizao figcaption { font-size: 14px; font-weight: 700; text-align: center; }
.wm-zhizao .merged-level-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 11px; }
.wm-zhizao .merged-main-col { width: 50px; }
.wm-zhizao .merged-sub-col { width: 54px; }
.wm-zhizao .merged-level-table th,.wm-zhizao .merged-level-table td { padding: 5px 3px; vertical-align: middle; text-align: center; border-bottom: 1px solid rgba(196,230,235,.2); overflow-wrap: anywhere; }
.wm-zhizao .merged-level-table thead th { color: #cde4e7; font-size: 10px; font-weight: 500; }
.wm-zhizao .merged-level-table tbody th { background: rgba(0,0,0,.18); }
.wm-zhizao .merged-sub { background: rgba(176,215,224,.07); border-left: 1px solid rgba(196,230,235,.2); border-right: 1px solid rgba(196,230,235,.2); }
.wm-zhizao .merged-level-table .merged-result { text-align: left; padding-left: 8px; }
.wm-zhizao .merged-result p { font-size: 11px; line-height: 1.5; }
.wm-zhizao .merged-result strong { display: block; font-size: 12px; }
.wm-zhizao .selected-character { width: 48px; height: 64px; object-fit: contain; }
.wm-zhizao .description-preview { display: flex; flex-direction: column; align-items: center; margin: 10px 0; gap: 5px; }
.wm-zhizao .description-preview img { width: 72px; height: 72px; object-fit: contain; }
.wm-zhizao .description-contents p { white-space: pre-wrap; }
.wm-zhizao .merged-result summary { font-size: 10px; font-weight: 400; color: #bcd0d5; }
.wm-zhizao .quote-summary { border-color: rgba(140,237,245,.6); }
.wm-dispatch-progress { padding: 8px; font-size: 12px; color: #d3f7f9; background: rgba(0,20,25,.85); border-radius: 6px; }

#bean-chat-overlay .message-bubble:has(.wm-dispatch-result){width:100%;max-width:100%;white-space:normal}

/* Compact current-turn proposal, shared by all conversation hosts. */
.wm-zhizao .compact-section{display:grid;grid-template-columns:64px minmax(0,1fr);gap:12px;align-items:center}
.wm-zhizao .compact-section>h3{margin:0;border-right:1px solid #6ebbb580;padding-right:8px}
.wm-zhizao .compact-section .category-item{display:flex;flex-direction:column;align-items:center;gap:5px;text-align:center}
.wm-zhizao .compact-cards{display:flex;flex-wrap:wrap;gap:10px;min-width:0}
.wm-zhizao .compact-card{width:112px;max-width:100%;padding:7px;border:1px solid #87d7d04d;border-radius:12px;background:#091c2280;box-sizing:border-box}
.wm-zhizao .compact-card>summary{cursor:pointer;list-style:none;display:flex;flex-direction:column;align-items:center;gap:5px;font-size:12px;overflow-wrap:anywhere;text-align:center}
.wm-zhizao .compact-card>summary::-webkit-details-marker{display:none}
.wm-zhizao .compact-card[open]{width:100%;text-align:left}
.wm-zhizao .compact-card[open]>summary{flex-direction:row;text-align:left}
.wm-zhizao .compact-card p{white-space:pre-wrap;overflow-wrap:anywhere;font-size:12px}
.wm-zhizao .compact-card ul{padding-left:20px;font-size:12px}
.wm-zhizao .compact-card .module-token{width:48px;height:48px;object-fit:contain}
.wm-zhizao .compact-character{width:60px;height:70px;object-fit:contain}
.wm-zhizao .application-summary{white-space:pre-wrap;line-height:1.8;overflow-wrap:anywhere}
.wm-zhizao .final-proposal .xiaolan-preview img{max-height:280px;max-width:100%;object-fit:contain}
.wm-zhizao .proposal-payment{padding:14px 20px;border:1px solid #92dbe0;border-radius:12px;background:#213550;color:#dce7ee;opacity:.7;cursor:not-allowed}
@media(max-width:480px){.wm-zhizao .compact-section{grid-template-columns:46px minmax(0,1fr);gap:8px}.wm-zhizao .compact-card{width:96px}}

/* Fixed phrases and selected values use independent semantic spans. */
.wm-zhizao .application-summary .narrative-fixed{color:#00c879;font-weight:700}
.wm-zhizao .application-summary .narrative-value{color:#fff}
.wm-zhizao .application-summary p{margin:0 0 12px;line-height:1.8;white-space:pre-wrap}

/* 智造简化09251410: original 40px icons, 54px options, category divider. */
.wm-zhizao{color:#f4f6f8;gap:10px}
.wm-zhizao .layout-bubble{border:0;border-radius:10px;background:rgba(0,0,0,.7);padding:10px;box-shadow:none}
.wm-zhizao .composition-intro{margin:0;padding:8px 10px;border-radius:10px;background:rgba(0,0,0,.7);font-size:13px;font-weight:700}
.wm-zhizao .compact-section{position:relative;grid-template-columns:48px minmax(0,1fr);column-gap:12px}
.wm-zhizao .compact-section>h3{border:0;padding:2px 0;margin:0 0 0 -10px;width:calc(100% + 10px);align-self:center;justify-content:center}
.wm-zhizao .compact-section::after{content:"";position:absolute;left:58px;top:6px;bottom:8px;width:1px;pointer-events:none;background:linear-gradient(to bottom,transparent,#f5da67 14%,#9be9b5 55%,#57cbdc 86%,transparent)}
.wm-zhizao .compact-cards{gap:2px 0;align-items:flex-start;align-content:flex-start;padding:2px 0}
.wm-zhizao details.compact-card,.wm-zhizao div.compact-card{width:54px;max-width:100%;min-width:0;margin:0;padding:0;border:0;border-radius:0;background:transparent;box-shadow:none}
.wm-zhizao .compact-card>summary{padding:0;gap:2px;font-size:12px;line-height:17px;display:flex;flex-direction:column;align-items:center;text-align:center}
.wm-zhizao .compact-card>summary>span:last-child{max-width:100%;font-size:11px;line-height:17px;overflow-wrap:anywhere}
.wm-zhizao .compact-card .category-item,.wm-zhizao h3 .category-item{gap:2px;font-size:12px;line-height:17px;flex-direction:column}
.wm-zhizao .reference-token{position:relative;display:inline-flex;align-items:center;justify-content:center;width:40px;height:40px;min-width:40px;flex:0 0 40px;isolation:isolate}
.wm-zhizao .reference-token img,.wm-zhizao .reference-token .compact-character{width:100%;height:100%;object-fit:contain}
.wm-zhizao .reference-value{position:absolute;z-index:2;left:50%;top:70%;transform:translate(-50%,-50%);width:76%;color:#fff;font-size:6px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:center;background:linear-gradient(90deg,transparent,rgba(0,0,0,.94) 10% 90%,transparent);border-top:1px solid #80d7e7;border-bottom:1px solid #d5bf79}
.wm-zhizao .module-flow-canvas{position:absolute;inset:0;pointer-events:none;z-index:3;width:100%;height:100%}
.wm-zhizao .compact-card[open]{width:100%;padding:8px;background:rgba(0,0,0,.35);border-radius:8px}
.wm-zhizao .compact-card[open]>summary{flex-direction:row;justify-content:flex-start;gap:8px}
.wm-zhizao .compact-card[open] p{font-size:12px}
.wm-zhizao .final-proposal .xiaolan-preview{position:relative;display:flex;height:260px;align-items:center;justify-content:flex-end;margin:12px 0 -10px;overflow:hidden}
.wm-zhizao .final-proposal .xiaolan-preview img{height:260px;max-height:260px;width:auto;max-width:100%;object-fit:contain}
.wm-zhizao .xiaolan-preview figcaption{position:absolute;bottom:7px;left:50%;transform:translateX(-50%);background:rgba(0,0,0,.7);border-top:1px solid #80d7e7;border-bottom:1px solid #d5bf79;padding:1px 8px;font-size:11px}
.wm-zhizao .proposal-payment{display:grid;place-items:center;width:136px;height:48px;margin-top:12px;padding:0 14px;border:0;border-radius:8px;color:#f3fdff;background:linear-gradient(115deg,rgba(20,105,139,.28),rgba(81,45,154,.46));box-shadow:inset 0 0 0 1px rgba(99,218,255,.22);font-size:16px;font-weight:800;opacity:1}
@media(max-width:560px){.wm-zhizao .compact-section{grid-template-columns:44px minmax(0,1fr);column-gap:10px}.wm-zhizao .compact-section::after{left:54px}.wm-zhizao details.compact-card{width:54px}.wm-zhizao details.compact-card[open]{width:100%}.wm-zhizao .final-proposal .xiaolan-preview{height:210px}.wm-zhizao .final-proposal .xiaolan-preview img{height:210px}}

/* Names scroll independently of click-only selection dialogs. */
.wm-zhizao .reference-value-track{display:inline-block;min-width:100%;white-space:nowrap}
.wm-zhizao .reference-value.is-overflow{text-overflow:clip;text-align:left}
.wm-zhizao .reference-value.is-overflow .reference-value-track{animation:zhizao-name-scroll var(--name-scroll-duration,8s) ease-in-out infinite alternate}
@keyframes zhizao-name-scroll{0%,15%{transform:translateX(0)}85%,100%{transform:translateX(var(--name-scroll-end,0px))}}
@media(prefers-reduced-motion:reduce){.wm-zhizao .reference-value.is-overflow .reference-value-track{animation:none}}
/* Selection changes replace the existing proposal; the dialog is shared by all chat hosts. */
.wm-zhizao .selection-entry{appearance:none;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer;padding:0;text-align:center}
.wm-zhizao .selection-entry:hover,.wm-zhizao .selection-entry:focus-visible{outline:2px solid #72e9ee;outline-offset:3px;border-radius:8px}
.zhizao-selection-dialog{color:#eefbff;background:#10282e;border:1px solid #70dbe4;border-radius:16px;width:min(660px,90vw);max-height:85vh;padding:20px;box-sizing:border-box;z-index:2147483647;font:14px/1.5 sans-serif;overflow:auto}
.zhizao-selection-dialog::backdrop{background:#001014b8}
.zhizao-selection-dialog h3{margin:0 0 12px}.selection-toolbar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:12px 0}
.selection-toolbar input{flex:1;min-width:100px;background:#07171e;color:white;padding:10px;border:1px solid #77cdd1;border-radius:6px}
.selection-toolbar button{background:#183e48;color:white;border:1px solid #71ced5;border-radius:6px;padding:8px 12px;cursor:pointer}.selection-toolbar button:disabled{opacity:.45;cursor:default}
.selection-branches fieldset{border:1px solid #43636b;margin:12px 0;border-radius:8px}.selection-branches legend{color:#97e9ed;padding:0 8px}
.selection-option{display:flex;gap:10px;align-items:center;padding:9px;cursor:pointer;border-radius:6px}.selection-option:hover{background:#234852}.selection-option input{width:18px;height:18px;accent-color:#5bdfd2;flex-shrink:0}
.selection-detail{margin:0 10px 8px 36px;color:#b8d7de;overflow-wrap:anywhere}.selection-detail p{white-space:pre-wrap}

.selection-branch>summary{cursor:pointer;padding:12px;background:#173941;border-radius:8px;margin-top:8px}.selection-option img{object-fit:contain;border-radius:6px}.selection-toolbar:last-child{position:sticky;bottom:-20px;background:#10282e;padding:12px 0;margin-bottom:0}

.zhizao-selection-dialog .selection-option input[type=checkbox]{flex:0 0 18px;min-width:18px;margin:0;padding:0}.zhizao-selection-dialog .selection-option span{flex:1;text-align:left}.zhizao-selection-dialog .selection-option img{flex:0 0 40px}

/* The recommendation remains visible; the picker fits the active conversation rectangle. */
.wm-zhizao button.compact-card.selection-entry{width:54px;max-width:100%;min-width:0;margin:0;padding:0;position:relative;display:flex;flex-direction:column;align-items:center;font-size:11px;line-height:17px}
.wm-zhizao .recommendation-count{font-size:9px;color:#a8e7ed;line-height:12px}.wm-zhizao .shape-list-trigger{border:0;background:none;color:inherit;padding:0;cursor:pointer}
.zhizao-selection-dialog{position:fixed;inset:auto;margin:0;max-width:none;max-height:none;min-width:0;padding:10px;border-radius:12px;overflow:hidden;box-sizing:border-box;font-size:12px}
.zhizao-selection-dialog[open]{display:flex;flex-direction:column;gap:5px}.zhizao-selection-dialog::backdrop{background:transparent}
.zhizao-selection-dialog h3{font-size:14px;margin:0;flex-shrink:0}.zhizao-selection-dialog .selection-hint{margin:0;font-size:11px;color:#b5d8df}
.zhizao-selection-dialog .selection-toolbar{margin:0;gap:4px;flex-shrink:0}.zhizao-selection-dialog .selection-toolbar input{min-width:50px;padding:6px;width:60px;font-size:12px}
.zhizao-selection-dialog .selection-toolbar select{min-width:60px;max-width:120px;background:#14323a;color:white;border:1px solid #68b6c0;border-radius:5px;padding:5px;font-size:11px}
.zhizao-selection-dialog .selection-toolbar button{padding:5px 7px;font-size:11px}.zhizao-selection-dialog [role=status]{margin:0;font-size:10px;min-height:15px}
.zhizao-selection-dialog .selection-branches{flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:2px}
.zhizao-selection-dialog .selection-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(72px,1fr));gap:6px;align-content:start}.zhizao-selection-dialog .selection-grid[hidden]{display:none}
.zhizao-selection-dialog .selection-option{position:relative;display:flex;flex-direction:column;gap:3px;align-items:center;justify-content:flex-start;min-width:0;border:1px solid #395861;border-radius:7px;margin:0;padding:6px 3px;color:white;font-size:11px}
.zhizao-selection-dialog .selection-option:has(input:checked){border-color:#68ded1;background:#214952}
.zhizao-selection-dialog .selection-option input[type=checkbox]{position:absolute;top:4px;right:4px;width:15px;height:15px;min-width:15px;flex:none;z-index:1}
.zhizao-selection-dialog .selection-option img{width:54px;height:64px;flex:none;object-fit:contain}.zhizao-selection-dialog .selection-option span{flex:none;text-align:center;overflow-wrap:anywhere;line-height:15px}
.zhizao-selection-dialog .selection-picked{color:#8ce6d4;font-size:9px}.zhizao-selection-dialog .selection-toolbar:last-child{position:static;padding:5px 0 0;bottom:auto;margin:0;border-top:1px solid #36515a}

.zhizao-selection-dialog .selection-header{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-shrink:0}.zhizao-selection-dialog .selection-dismiss{flex:none;display:grid;place-items:center;width:28px;height:28px;padding:0;border:1px solid #639da7;border-radius:6px;background:#193b44;color:white;font-size:22px;line-height:1;cursor:pointer}.zhizao-selection-dialog .selection-dismiss:hover{background:#30535d}
/* API proposals use the same 0928 reference card geometry, with live values. */
.wm-zhizao.reference-proposal{gap:10px;color:#f4f6f8;font-family:Arial,"Microsoft YaHei",sans-serif}
.reference-proposal .reference-proposal-banner{position:relative;isolation:isolate;padding:7px 14px;border:2px solid transparent;border-radius:12px;background:linear-gradient(#030c0de0,#030c0de0) padding-box,linear-gradient(110deg,#a777ff,#58eaff,#ffe875,#ff67d4) border-box;text-align:center;font-size:24px;font-weight:800;line-height:1.35}
.wm-zhizao.reference-proposal .compact-section{grid-template-columns:48px minmax(0,1fr);column-gap:12px}
.wm-zhizao.reference-proposal .compact-section::after{left:58px}
.wm-zhizao.reference-proposal .compact-cards{gap:2px 0}
.wm-zhizao.reference-proposal button.compact-card.selection-entry{width:50px;font-size:12px;line-height:17px}
.wm-zhizao.reference-proposal .compact-card .category-item{width:100%;font-size:12px;line-height:17px;gap:2px}
.wm-zhizao.reference-proposal .compact-card .category-item>span:last-child{white-space:nowrap;max-width:100%;letter-spacing:-.3px}
.wm-zhizao.reference-proposal .compact-card .category-item>.result-name-long{font-size:8px;letter-spacing:0}
.wm-zhizao.reference-proposal .compact-card .reference-token{width:40px;height:40px;min-width:40px;flex-basis:40px}
.wm-zhizao.reference-proposal .reference-value{font-family:Arial,"Microsoft YaHei",sans-serif;font-weight:400}
.wm-zhizao.reference-proposal .application-summary .narrative-fixed{color:inherit;font-weight:700}
.wm-zhizao.reference-proposal .application-summary p{font-size:13px;line-height:1.8}
.wm-zhizao.reference-proposal .final-proposal h3,.wm-zhizao.reference-proposal .quote-summary h3{font-size:16px}
.wm-zhizao.reference-proposal .layout-bubble{background:rgba(0,0,0,.7);border-radius:10px;padding:10px;border:0}
.wm-zhizao.reference-proposal .proposal-payment{width:136px;height:48px;font-size:16px;font-weight:800}
@container (max-width:360px){.wm-zhizao.reference-proposal .reference-proposal-banner{font-size:18px}}
