/* One request, real candidates, and an explicit handoff to the confirmation form. */
#modal:has(#shopping-guide-root){width:min(920px,calc(100vw - 40px));max-height:90dvh;padding:0;overflow:hidden;background:var(--paper)}
.shopping-guide-shell{position:relative;display:flex;flex-direction:column;height:min(740px,88dvh);max-height:inherit;min-height:0;color:var(--ink);background:var(--paper)}
.shopping-guide-shell [hidden]{display:none!important}
.shopping-guide-shell .shopping-guide-head{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;gap:16px;padding:16px 24px;border-bottom:1px solid var(--line);background:var(--paper)}
.shopping-guide-head>div{min-width:0}
.shopping-guide-eyebrow{display:block;margin-bottom:3px;color:var(--muted);font-size:12px}
.shopping-guide-head h2{margin:0;font-size:20px;font-weight:600;line-height:1.45}
.shopping-guide-head p{margin:3px 0 0;color:var(--muted);font-size:12px}
.shopping-guide-shell .shopping-guide-close{display:grid;place-items:center;flex-shrink:0;width:44px;min-width:44px;height:44px;padding:0;border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--muted)}
.shopping-guide-close svg{width:18px;height:18px}
.shopping-guide-close:hover{background:var(--surface-subtle)}
.shopping-guide-scroll{position:relative;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable;padding:18px 24px;scroll-padding-block:16px;-webkit-overflow-scrolling:touch}
.shopping-guide-search{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:stretch;gap:10px;margin:0}
.shopping-guide-search .field{position:relative;min-width:0;margin:0}
.shopping-guide-search textarea{display:block;width:100%;min-height:72px;max-height:160px;resize:vertical;padding:10px 12px;border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--ink);font-size:14px;line-height:1.65}
.shopping-guide-search>.btn{min-width:112px;min-height:44px;align-self:stretch}
.shopping-guide-caption,.shopping-guide-evidence{margin:8px 0 0;color:var(--muted);font-size:12px;line-height:1.65;overflow-wrap:anywhere}
.shopping-guide-examples{display:flex;flex-wrap:wrap;gap:6px;margin-top:10px}
.shopping-guide-examples button{min-height:36px;padding:6px 10px;border:1px solid var(--line);border-radius:6px;background:var(--surface-subtle);color:var(--muted);font-size:12px;text-align:left}
.shopping-guide-examples button:hover{border-color:var(--brand);color:var(--brand)}
.shopping-guide-status{margin:12px 0;color:var(--brand);font-size:12px;line-height:1.65}
.shopping-guide-status:empty,.shopping-guide-evidence:empty{display:none}
.shopping-guide-result{margin-top:18px}
.shopping-guide-list-heading{display:flex;align-items:baseline;justify-content:space-between;flex-wrap:wrap;gap:4px 12px;margin-bottom:8px}
.shopping-guide-list-heading h3{margin:0;font-size:14px;font-weight:600}
.shopping-guide-list-heading>span{color:var(--muted);font-size:12px}
.shopping-guide-products{list-style:none;margin:0;padding:0;border:1px solid var(--line);border-radius:6px;overflow:hidden}
.shopping-guide-product{position:relative;display:grid;grid-template-columns:32px 56px minmax(0,1fr) 112px;align-items:center;gap:12px;padding:12px;border-bottom:1px solid var(--line);background:var(--paper)}
.shopping-guide-product:last-child{border-bottom:0}
.shopping-guide-product:has([data-guide-pick]:checked){background:var(--brand-soft)}
.shopping-guide-pick{position:relative;display:grid;place-items:center;align-self:stretch;min-width:32px;min-height:44px;cursor:pointer}
.shopping-guide-pick input{width:18px;height:18px;margin:0;accent-color:var(--brand);cursor:pointer}
.shopping-guide-product>img,.shopping-guide-image-placeholder{display:block;width:56px;height:56px;border:1px solid var(--line);border-radius:4px;background:var(--paper);object-fit:contain}
.shopping-guide-image-placeholder{display:grid;place-items:center;background:var(--surface-subtle);color:var(--muted)}
.shopping-guide-image-placeholder svg{width:24px;height:24px}
.shopping-guide-product-copy{display:grid;grid-template-columns:minmax(0,1fr) 128px;column-gap:14px;min-width:0}
.shopping-guide-product-name{display:-webkit-box;grid-column:1;overflow:hidden;-webkit-line-clamp:2;-webkit-box-orient:vertical;color:var(--ink);font-size:14px;font-weight:500;line-height:1.5;overflow-wrap:anywhere;cursor:pointer}
.shopping-guide-product-copy>p,.shopping-guide-product-copy>small{grid-column:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--muted);font-size:12px;line-height:1.65}
.shopping-guide-product-copy>p{margin:3px 0 0}
.shopping-guide-product-copy>strong{grid-column:2;grid-row:1 / 4;align-self:center;color:var(--ink);font-size:15px;font-weight:600;line-height:1.55;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.shopping-guide-product-copy>strong small{color:var(--muted);font-size:12px;font-weight:400}
.shopping-guide-product-quantity{position:relative;display:flex;flex-direction:column;align-self:center;gap:4px;min-width:0}
.shopping-guide-product-quantity>label{color:var(--muted);font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.shopping-guide-product-quantity input{width:100%;min-width:0;min-height:38px;padding:7px 8px;border:1px solid var(--line);border-radius:6px;background:var(--paper);color:var(--ink);font-size:14px;line-height:1.5;font-variant-numeric:tabular-nums}
.shopping-guide-quantity-hint{grid-column:3 / -1;display:flex;align-items:center;gap:6px;min-width:0;margin:0;color:var(--muted);font-size:12px;line-height:1.65;overflow-wrap:anywhere}
.shopping-guide-quantity-hint>span{min-width:0;flex:1}
.shopping-guide-quantity-hint strong{color:var(--brand);font-weight:500;margin-right:8px}
.shopping-guide-estimate-reason{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;color:var(--muted)}
.shopping-guide-quantity-hint .zx-help{flex-shrink:0;margin:0}
.shopping-guide-quantity-hint.is-manual{color:var(--muted)}
.shopping-guide-quantity-note{margin:0 0 9px;color:var(--muted);font-size:12px;line-height:1.65;overflow-wrap:anywhere}
.shopping-guide-field-error{display:block;color:var(--danger);font-size:12px;line-height:1.5;overflow-wrap:anywhere}
.shopping-guide-field-error:empty{display:none}
.shopping-guide-shell textarea:focus,.shopping-guide-product-quantity input:focus{outline:none;border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-soft)}
.shopping-guide-shell [aria-invalid="true"]{border-color:var(--danger);background:#fff7f6}
.shopping-guide-shell [aria-invalid="true"]:focus{box-shadow:0 0 0 3px #fee4e2}
.shopping-guide-empty{padding:20px 16px;border:1px solid var(--line);border-radius:6px;background:var(--surface-subtle)}
.shopping-guide-empty h3{margin:0 0 4px;color:var(--ink);font-size:14px}
.shopping-guide-empty p{margin:0;color:var(--muted);font-size:12px}
.shopping-guide-feedback{display:flex;align-items:flex-start;gap:10px;flex-shrink:0;min-width:0;padding:0 24px}
.shopping-guide-feedback:has(.shopping-guide-error:empty):has([hidden]){display:none}
.shopping-guide-error{flex:1;min-width:0;margin:0 0 10px;color:var(--danger);font-size:12px;line-height:1.65;overflow-wrap:anywhere}
.shopping-guide-error:empty{display:none}
.shopping-guide-feedback .btn{flex-shrink:0;margin-bottom:10px}
.shopping-guide-scroll .shopping-guide-feedback{padding:0;margin-top:8px}
.shopping-guide-footer{display:flex;align-items:center;justify-content:space-between;flex-shrink:0;gap:16px;padding:12px 24px;border-top:1px solid var(--line);background:var(--paper)}
.shopping-guide-footer-copy{min-width:0}
.shopping-guide-footer-copy strong{display:block;color:var(--ink);font-size:14px;font-weight:600;line-height:1.5;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.shopping-guide-footer-copy small{display:block;margin-top:2px;color:var(--muted);font-size:12px;line-height:1.5}
.shopping-guide-footer>.btn{flex-shrink:0;min-height:44px;min-width:132px}
.shopping-guide-shell button:focus-visible,.shopping-guide-pick input:focus-visible{outline:3px solid var(--brand);outline-offset:2px}
.shopping-guide-shell button:disabled{cursor:default}

@media(max-width:800px){
 #modal:has(#shopping-guide-root){width:100%;max-width:100%;max-height:86dvh;container-type:size;container-name:guide-sheet}
 .shopping-guide-shell{flex:1;height:auto;max-height:none;min-height:0}
 .shopping-guide-shell .shopping-guide-head{padding:4px 16px 10px;gap:10px}
 .shopping-guide-head h2{font-size:18px}
 .shopping-guide-eyebrow{margin-bottom:2px}
 .shopping-guide-scroll{padding:14px 16px;scrollbar-gutter:auto}
 .shopping-guide-search{gap:8px}
 .shopping-guide-search textarea{min-height:76px;max-height:132px;font-size:16px;padding:8px 10px}
 .shopping-guide-search>.btn{min-width:88px;padding-inline:10px;font-size:14px}
 .shopping-guide-examples button{min-height:44px}
 .shopping-guide-result{margin-top:14px}
 .shopping-guide-list-heading{gap:3px}
 .shopping-guide-list-heading .zx-help-trigger{min-width:44px}
 .shopping-guide-product{grid-template-columns:44px 44px minmax(0,1fr) 92px;align-items:start;gap:2px 8px;padding:10px}
 .shopping-guide-pick{grid-column:1;grid-row:1 / 4;min-width:44px;align-self:stretch}
 .shopping-guide-product>img,.shopping-guide-image-placeholder{grid-column:2;grid-row:1 / 4;width:44px;height:44px;margin-top:1px}
 .shopping-guide-product-copy{display:contents}
 .shopping-guide-product-name{grid-column:3 / 5;grid-row:1;font-size:14px}
 .shopping-guide-product-copy>p{grid-column:3 / 5;grid-row:2;margin:0}
 .shopping-guide-product-copy>small{grid-column:3 / 5;grid-row:3}
 .shopping-guide-product-copy>strong{grid-column:2 / 4;grid-row:4;align-self:center;margin-top:8px;padding-right:6px;font-size:14px}
 .shopping-guide-product-quantity{grid-column:4;grid-row:4;margin-top:8px;gap:3px}
 .shopping-guide-product-quantity input{min-height:44px;padding:8px;font-size:16px}
 .shopping-guide-product-quantity>label{font-size:12px}
 .shopping-guide-quantity-hint{grid-column:2 / -1;grid-row:5;margin-top:3px}
 .shopping-guide-quantity-hint .zx-help-trigger,.shopping-guide-quantity-hint .zx-help-fallback>summary{display:inline-flex;align-items:center;justify-content:center;min-width:44px;min-height:44px}
 .shopping-guide-feedback{padding:0 16px}
 .shopping-guide-feedback .btn{min-height:44px}
 .shopping-guide-footer{gap:10px;padding:10px 16px max(10px,env(safe-area-inset-bottom))}
 .shopping-guide-footer-copy strong{font-size:13px}
 .shopping-guide-footer-copy small{font-size:12px}
 .shopping-guide-footer>.btn{min-width:124px;padding-inline:12px;font-size:14px}
 @container guide-sheet (max-height:360px){
  .shopping-guide-shell .shopping-guide-head{padding:0 12px 5px;min-height:49px}
  .shopping-guide-head h2{font-size:16px}
  .shopping-guide-eyebrow,.shopping-guide-head p,.shopping-guide-footer-copy small{display:none}
  .shopping-guide-scroll{padding:10px 12px}
  .shopping-guide-footer{padding:6px 12px max(6px,env(safe-area-inset-bottom));gap:8px}
  .shopping-guide-footer-copy strong{font-size:12px}
  .shopping-guide-footer>.btn{min-width:116px;padding-inline:10px}
  .shopping-guide-feedback{padding:0 12px}
  .shopping-guide-scroll .shopping-guide-feedback{padding:0}
 }
}
@media(prefers-reduced-motion:reduce){.shopping-guide-shell *{scroll-behavior:auto!important}}
