/* Explicit legend-to-segment mapping, recipe correction, and target control. */
body.av-new .av-bar-map{position:relative;min-width:0;padding-right:32px;color:#a9becc;isolation:isolate}
body.av-new .av-bar-map .av-ingot{width:100%;max-width:none;margin:0}
body.av-new .av-legend-lines{position:absolute;inset:0;width:100%;height:100%;overflow:visible;pointer-events:none;z-index:2}
body.av-new .av-legend-line{color:#a2b6c4;opacity:.5;fill:none}
body.av-new .av-legend-anchor{fill:#adc0cc;opacity:.8}
body.av-new .av-legend-line.is-selected{color:#f1cd87;opacity:1;stroke-width:1.5px}
body.av-new .av-legend-anchor.is-selected{fill:#f1cd87;opacity:1}
body.av-new .av-bar-map .av-element-legend{display:grid;grid-template-columns:minmax(0,1fr);gap:3px;margin-top:var(--av-leader-gap,25px)}
body.av-new .av-bar-map .av-element-legend>button{position:relative;display:flex;align-items:center;gap:8px;width:100%;min-width:0;min-height:46px;padding:5px 7px;border:1px solid transparent;border-radius:5px;font-size:14px;line-height:1.4;color:#d5e1e9;box-sizing:border-box}
body.av-new .av-legend-copy{min-width:0;flex:1;display:flex;justify-content:space-between;align-items:center;gap:8px;overflow-wrap:anywhere}
body.av-new .av-legend-copy>span{min-width:0}
body.av-new .av-legend-copy small{color:#94aab9;font-size:11px}
body.av-new .av-legend-copy b{display:block;font-weight:500;font-size:14px;color:#c8d7e2;white-space:nowrap}
body.av-new .av-row-anchor{position:absolute;right:-2px;top:50%;width:4px;height:4px;transform:translateY(-50%);border-radius:50%;background:#aabfcd}
body.av-new .av-element-legend>button.is-selected{border-color:#a98d58;background:#2b302c;color:#f3d594}
body.av-new .av-element-legend>button.is-selected .av-legend-copy b{color:#f4d49a}
body.av-new .av-segment.is-selected{box-shadow:inset 0 0 0 2px #fff0c6;filter:brightness(1.13)}
body.av-new .av-element-legend>button:focus-visible{outline:2px solid #ebc57e;outline-offset:2px}
body.av-new .av-element-node h3{display:flex;flex-wrap:nowrap;gap:5px;align-items:flex-start;min-height:44px}
body.av-new .av-element-node h3 .av-component-name{display:block;font-family:inherit;font-weight:500;font-size:14px;line-height:1.5;opacity:1;margin:0;flex:1;min-width:0;overflow-wrap:anywhere;color:#d6e1e8}
body.av-new .av-component-name .av-dot{margin-right:4px}
body.av-new .av-component-name small{display:block;font:12px/1.4 Georgia,serif;color:#99aebc}
body.av-new .av-remove-element{flex-shrink:0;min-width:44px;width:44px;height:44px;min-height:44px;padding:0;border:1px solid #60717a;border-radius:6px;background:#152b3a;color:#dfbe87;font:24px/1 system-ui;cursor:pointer}
body.av-new .av-remove-element:hover{border-color:#d0ad70;background:#253644}
body.av-new .av-removal-notice{margin-top:14px;padding:12px;border:1px solid #726348;border-radius:7px;color:#dec28f;font-size:14px;line-height:1.6;overflow-wrap:anywhere}
body.av-new .av-removal-notice p{margin:0 0 8px}
body.av-new .av-removal-notice button{min-height:44px;padding:8px 12px;font-size:15px;color:#f0d398;border:1px solid #a48b5c;border-radius:6px;background:#283128;cursor:pointer}
body.av-new .av-between.av-flow-control{position:static!important;transform:none!important;display:grid;grid-template-columns:minmax(0,1fr) minmax(200px,270px);align-items:center;gap:24px;padding:16px 18px;margin:16px 0 20px;border:1px solid #64705e;border-radius:10px;background:#102332}
body.av-new .av-flow-diagram{display:flex;align-items:center;gap:14px;min-width:0;color:#d9b977;font-size:16px;font-weight:500;letter-spacing:.04em}
body.av-new .av-flow-diagram .av-flow-arrow{display:block;flex:1;width:100%;min-width:100px;height:40px;transform:none!important;color:#e2bc6d}
body.av-new .av-flow-control #av-direction{display:flex;flex-direction:column;justify-content:center;align-items:center;gap:4px;width:100%;min-width:140px;min-height:58px;padding:8px 12px;background:#1a303d;border:1px solid #b49a63;border-radius:8px;color:#f1d394;cursor:pointer}
body.av-new .av-flow-control #av-direction>span{display:block;font-size:17px;line-height:1.4}
body.av-new .av-flow-control #av-direction>small{display:block;white-space:normal;text-align:center;font-size:13px;font-weight:400;line-height:1.5;color:#c1cdd6}
body.av-new .av-direction-note{max-width:none}
body.av-new .av-layout{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
body.av-new .av-components-layout{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}
body.av-new .av-composition-gap{display:none}
@media(max-width:860px){
 body.av-new .av-between.av-flow-control{display:flex;flex-direction:column;gap:12px;padding:14px 12px;margin-top:12px}
 body.av-new .av-flow-diagram{width:100%;gap:10px;font-size:16px}
 body.av-new .av-flow-control #av-direction{min-height:54px;width:100%}
 body.av-new .av-layout,body.av-new .av-components-layout{gap:12px}
 body.av-new .av-legend-copy{display:block}
 body.av-new .av-bar-map .av-element-legend>button{font-size:13px;gap:5px;padding:5px 3px}
 body.av-new .av-legend-copy b{font-size:13px}
 body.av-new .av-legend-copy small{display:block;font-size:11px}
 body.av-new .av-element-node h3{flex-direction:column;align-items:stretch}
 body.av-new .av-element-node h3 .av-remove-element{align-self:flex-end}
 body.av-new .av-element-node h3 .av-component-name{font-size:13px}
 body.av-new .av-removal-notice{padding:8px;font-size:13px}
}
