#picker{width:min(780px,calc(100vw - 32px));max-width:780px;height:min(820px,88vh);max-height:88vh;padding:0;border:0;border-radius:16px;box-shadow:0 24px 80px #102b4940;color:#18324b;overflow:hidden;box-sizing:border-box}
#picker[open]{display:flex;flex-direction:column}
#picker::backdrop{background:#10243c70}
#picker .dialog-head{flex:none;display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin:0;padding:24px 28px 20px;border-bottom:1px solid #e5eaf0;background:white}
#picker h2{font-size:21px;line-height:1.4;margin:0 0 8px}
#picker .dialog-head p{margin:0;font-size:14px;line-height:1.7;color:#718092}
#picker #close{flex:none;padding:8px 14px;margin:0;min-height:38px}
#picker #choices{min-height:0;overflow-y:auto;overscroll-behavior:contain;flex:1;padding:20px 24px;background:#f5f7fa;scroll-padding:20px}
#picker .candidate{display:block;margin:0 0 16px;padding:0;border:1px solid #e1e7ef;border-radius:12px;background:#fff;overflow:hidden}
#picker .candidate:last-child{margin-bottom:0}
#picker .candidate-main{padding:20px 22px 16px}
#picker .candidate h3{margin:0 0 10px;font-size:17px;line-height:1.6;font-weight:650;color:#16334f;overflow-wrap:anywhere}
#picker .candidate-brand{font-size:13px;line-height:1.8;color:#66788a;display:flex;gap:8px 20px;flex-wrap:wrap}
#picker .candidate-brand span{color:#8895a3}
#picker dl{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 24px;margin:16px 0 0}
#picker dl div{min-width:0}#picker dt{font-size:12px;line-height:1.6;color:#8895a3;margin-bottom:3px}#picker dd{font-size:14px;line-height:1.7;margin:0;overflow-wrap:anywhere;color:#364c61}
#picker .candidate-note{margin:14px 0 0;padding:9px 12px;background:#fff8e9;border-radius:6px;color:#916718;font-size:13px;line-height:1.7}
#picker .candidate-bottom{display:flex;align-items:center;justify-content:space-between;gap:16px;padding:15px 22px;border-top:1px solid #eff2f6}
#picker .candidate-bottom strong{font-size:16px;line-height:1.7;color:#d91535;display:block}
#picker .candidate-stock{display:block;color:#718092;font-size:12px;line-height:1.8;margin-top:3px}
#picker .candidate-bottom button{flex:none;min-height:40px;padding:9px 18px;border:1px solid #e31c3c;border-radius:7px;background:#fff5f6;color:#cf1231;font-size:14px;font-weight:600}
#picker .candidate-footer{flex:none;background:#fff;padding:16px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;border-top:1px solid #e1e7ef}
#picker #candidate-count{font-size:12px;color:#788797;line-height:1.7}
#picker #more-candidates{font-size:14px;min-height:42px;padding:10px 20px;border:1px solid #d21a38;color:#d21a38;background:white;border-radius:7px;white-space:nowrap}
#picker #more-candidates:disabled{border-color:#dce2e9;color:#8b96a4;background:#f5f7fa;cursor:default}
#picker button:focus-visible{outline:3px solid #96baff;outline-offset:3px}
#picker .candidate-empty{padding:24px;color:#718092;font-size:15px;line-height:1.8}
@media(max-width:600px){#picker{width:calc(100vw - 16px);max-height:92vh;height:92vh;border-radius:12px}#picker .dialog-head{padding:18px 16px}#picker h2{font-size:19px}#picker #choices{padding:12px}#picker .candidate-main{padding:16px}#picker .candidate h3{font-size:16px}#picker dl{gap:10px 16px}#picker .candidate-bottom{padding:13px 16px;gap:8px}#picker .candidate-bottom strong{font-size:14px}#picker .candidate-bottom button{padding:8px 12px}#picker .candidate-footer{padding:12px;gap:8px;flex-wrap:wrap}#picker #more-candidates{flex:1}#picker #candidate-count{flex:1;min-width:120px}}

/* Expanded comparison dialog */
#picker{width:calc(100vw - 48px);max-width:1240px;height:94vh;max-height:94vh}
#picker #choices{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-content:start;gap:18px;padding:24px 28px}
#picker .candidate{margin:0;display:flex;flex-direction:column;min-width:0}
#picker .candidate-main{flex:1;padding:22px 24px 18px}
#picker .candidate h3{font-size:18px}
#picker .candidate-brand{font-size:14px}
#picker dd{font-size:15px}
#picker .candidate-bottom{padding:16px 24px}
#picker .candidate-empty{grid-column:1/-1}
@media(max-width:850px){#picker{width:calc(100vw - 16px);height:94vh;max-height:94vh}#picker #choices{grid-template-columns:1fr;padding:16px;gap:14px}#picker .candidate-main{padding:18px}#picker .candidate h3{font-size:17px}#picker .candidate-bottom{padding:14px 18px}}

/* Keep card content at its natural height inside the scrolling list. */
#picker #choices{grid-auto-rows:max-content;align-items:stretch}
#picker .candidate{display:flex;align-items:stretch;justify-content:flex-start;gap:0;min-height:max-content;height:auto;overflow:visible}
#picker .candidate-main{flex:0 0 auto;box-sizing:border-box;width:100%;min-width:0}
#picker .candidate-bottom{flex:0 0 auto;box-sizing:border-box;width:100%;min-width:0;flex-wrap:wrap;margin-top:auto}
#picker .candidate-bottom>div{min-width:0;flex:1 1 180px}
#picker .candidate-bottom strong{overflow-wrap:anywhere}

/* 源叶式"一卡多包装"：候选卡内同货号包装下拉 */
.cv-package select.cv-pack-select {
  max-width: 240px; padding: 4px 8px; border: 1px solid #d7e2ee; border-radius: 5px;
  background: #fff; color: inherit; font-size: 13px; cursor: pointer; vertical-align: middle;
}
.cv-package select.cv-pack-select:focus { outline: 2px solid #bcd4f5; }
