/* Shop consultant: one conversation scroller and a persistent composer. */
html body.in-shop #consultant-panel{
 --consultant-ink:#242424;--consultant-muted:#666;--consultant-line:#e7e9eb;--consultant-neutral:#f1f3f5;--consultant-yellow:#ffe500;--consultant-focus:#079ceb;
 position:fixed;inset:88px 24px 24px auto;width:min(460px,calc(100vw - 48px));max-width:none;max-height:none;margin:0;padding:0;display:flex;flex-direction:column;overflow:hidden;min-height:0;border:1px solid var(--consultant-line);border-radius:20px;background:#fff;color:var(--consultant-ink);box-shadow:0 18px 65px #24242424;font-family:Onest,Arial,sans-serif;z-index:46;
}
html body.in-shop #consultant-panel[hidden],html body.in-shop #consultant-panel [hidden]{display:none!important}
html body.in-shop #consultant-panel :is(button,input,textarea,select,summary,a){font-family:inherit}
html body.in-shop #consultant-panel :is(button,input,textarea,select,summary,a):focus-visible{outline:3px solid var(--consultant-focus);outline-offset:-3px}
html body.in-shop #consultant-panel button{cursor:pointer}
html body.in-shop #consultant-panel button:disabled{cursor:default;opacity:.55}
html body.in-shop #consultant-panel .consultant-header{position:relative;top:auto;flex:none;display:flex;align-items:center;gap:12px;min-height:68px;padding:12px 16px;border-bottom:1px solid var(--consultant-line);background:#fff;z-index:2}
html body.in-shop #consultant-panel .consultant-header>.robot-mini{display:none}
html body.in-shop #consultant-panel .consultant-header>div{flex:1;min-width:0}
html body.in-shop #consultant-panel .consultant-header h2{margin:0;font-size:17px;line-height:1.2;font-weight:700;color:var(--consultant-ink);letter-spacing:-.2px}
html body.in-shop #consultant-panel .consultant-header div>span{display:block;margin-top:4px;font-size:11px;line-height:1.35;color:var(--consultant-muted)}
html body.in-shop #consultant-panel #consultant-close{min-height:44px;min-width:44px;max-width:46%;padding:10px 12px;flex:none;border:1px solid var(--consultant-line);border-radius:12px;background:var(--consultant-neutral);color:var(--consultant-ink);font-size:12px;line-height:1.3;font-weight:600;white-space:normal;text-align:center}

/* Role changes stay visible. Optional actions open above the conversation. */
html body.in-shop #consultant-panel .consultant-desk.is-compact{position:relative;flex:none;min-height:0;max-height:none;overflow:visible;padding:10px 16px 0;border-bottom:1px solid var(--consultant-line);background:#fff;color:var(--consultant-ink);z-index:4}
html body.in-shop #consultant-panel .consultant-roles{position:static;top:auto;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px;padding:0;background:#fff;z-index:auto}
html body.in-shop #consultant-panel .consultant-role{min-width:0;min-height:44px;padding:8px 5px;border:1px solid var(--consultant-line);border-radius:10px;background:var(--consultant-neutral);color:var(--consultant-ink);font-size:11px;line-height:1.3;font-weight:600}
html body.in-shop #consultant-panel .consultant-role[aria-pressed=true]{border-color:#d0ba00;background:var(--consultant-yellow);color:var(--consultant-ink)}
html body.in-shop #consultant-panel .consultant-desk-options{position:relative}
html body.in-shop #consultant-panel .consultant-desk-options>summary{min-height:44px;padding:13px 1px;color:var(--consultant-muted);font-size:11px;line-height:1.5;cursor:pointer}
html body.in-shop #consultant-panel .consultant-desk-options-body{position:absolute;top:calc(100% - 1px);left:-1px;right:-1px;max-height:min(360px,45dvh);padding:12px;overflow:auto;overscroll-behavior:contain;background:#fff;border:1px solid var(--consultant-line);border-radius:12px;box-shadow:0 12px 30px #24242424;z-index:5}
html body.in-shop #consultant-panel .consultant-desk-content p{font-size:13px;line-height:1.5;margin:0 0 12px;color:var(--consultant-muted)}
html body.in-shop #consultant-panel .consultant-desk-content small{font-size:11px;line-height:1.45;color:var(--consultant-muted)}
html body.in-shop #consultant-panel .consultant-desk-actions{display:flex;flex-wrap:wrap;gap:8px}
html body.in-shop #consultant-panel .consultant-action{min-height:44px;max-width:100%;padding:10px 12px;border:1px solid var(--consultant-line);border-radius:10px;background:var(--consultant-neutral);color:var(--consultant-ink);font-size:12px;line-height:1.4}
html body.in-shop #consultant-panel .consultant-dismiss{min-height:44px;margin:8px 0 0;padding:10px 0;border:0;background:transparent;color:var(--consultant-muted);font-size:12px;line-height:1.5;text-decoration:underline;text-underline-offset:3px}
html body.in-shop #consultant-panel .consultant-desk-status{font-size:12px;line-height:1.45;color:var(--consultant-muted)}
html body.in-shop #consultant-panel .consultant-pick{min-height:44px;border-color:var(--consultant-line);border-radius:10px;color:var(--consultant-ink);background:#fff}
html body.in-shop #consultant-panel .consultant-pick input{accent-color:#242424}
html body.in-shop #consultant-panel .consultant-pick strong{font-size:12px;line-height:1.4}

html body.in-shop #consultant-panel #consultant-product-context{display:flex;align-items:center;gap:12px;flex:none;min-height:0;padding:10px 16px;border-bottom:1px solid var(--consultant-line);background:#fffbe5}
html body.in-shop #consultant-panel #consultant-product-context>div{flex:1;min-width:0}
html body.in-shop #consultant-panel #consultant-product-context span{display:block;color:var(--consultant-muted);font-size:10px;line-height:1.4}
html body.in-shop #consultant-panel #consultant-product-title{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;overflow-wrap:anywhere;margin:3px 0;font-size:14px;line-height:1.3;font-weight:600}
html body.in-shop #consultant-panel #consultant-product-category{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--consultant-muted);font-size:11px;line-height:1.4}
html body.in-shop #consultant-panel #consultant-product-category:empty{display:none}
html body.in-shop #consultant-panel #consultant-product-return{flex:none;max-width:108px;min-height:44px;padding:8px 10px;border:1px solid #dcd6b6;border-radius:10px;background:#fff;color:var(--consultant-ink);font-size:11px;line-height:1.3;font-weight:600}

/* Every informational section shares this scroller; long chat cannot shrink the input. */
html body.in-shop #consultant-panel .consultant-scroll{flex:1 1 0;min-height:0;overflow:auto;overscroll-behavior:contain;touch-action:pan-y;padding:14px 16px;scrollbar-width:thin;scrollbar-color:#c4c9ce transparent;scroll-padding:12px}
html body.in-shop #consultant-panel #consultant-history-notice{flex:none;padding:10px 12px;margin:0;background:var(--consultant-neutral);border:0;border-radius:10px;color:var(--consultant-muted);font-size:11px;line-height:1.45}
html body.in-shop #consultant-panel #consultant-history-status{padding:10px 12px;margin:8px 0;background:#fff6da;border-radius:10px;color:#6b5525;font-size:11px;line-height:1.45}
html body.in-shop #consultant-panel #consultant-history-status:empty{display:none}
html body.in-shop #consultant-panel #consultant-business-open{min-height:44px;max-width:100%;margin:12px 0;padding:10px 12px;font-size:12px}
html body.in-shop #consultant-panel #chat-messages{display:flex;flex-direction:column;flex:none;gap:10px;min-height:0;max-height:none;padding:0;margin:14px 0;overflow:visible;scrollbar-width:auto}
html body.in-shop #consultant-panel .chat-message{flex:none;max-width:94%;padding:12px 13px;border-radius:12px;font-size:13px;line-height:1.55;overflow-wrap:anywhere;color:var(--consultant-ink)}
html body.in-shop #consultant-panel .chat-message.assistant{background:var(--consultant-neutral);border-bottom-left-radius:4px}
html body.in-shop #consultant-panel .chat-message.user{background:#fff7b1;color:var(--consultant-ink);border-bottom-right-radius:4px}
html body.in-shop #consultant-panel .faq-prompt{min-height:44px;padding:10px 12px;border:1px solid var(--consultant-line);border-radius:10px;font-size:12px;line-height:1.45;color:var(--consultant-ink);background:#fff;text-align:left}
html body.in-shop #consultant-panel .consultant-extras{min-width:0;margin-top:12px;border-top:1px solid var(--consultant-line)}
html body.in-shop #consultant-panel .consultant-extras>summary{min-height:44px;padding:12px 0;color:var(--consultant-muted);font-size:12px;line-height:1.5;cursor:pointer}
html body.in-shop #consultant-panel #chat-suggestions{display:flex;flex-wrap:wrap;flex:none;gap:8px;margin:0;padding:4px 0 10px;overflow:visible}
html body.in-shop #consultant-panel #chat-suggestions button{min-height:44px;max-width:100%;margin:0!important;padding:10px 12px;border:1px solid var(--consultant-line);border-radius:10px;background:#fff;color:var(--consultant-ink);font-size:12px!important;line-height:1.4}
html body.in-shop #consultant-panel .voice-note{padding:0;margin:0 0 10px;color:var(--consultant-muted);font-size:11px;line-height:1.45}
html body.in-shop #consultant-panel .consultation-sheet{margin:10px 0 0;padding:12px;min-width:0;border:1px solid var(--consultant-line);border-radius:12px;background:#fafafa;color:var(--consultant-ink);font-family:inherit;font-size:13px;line-height:1.5}
html body.in-shop #consultant-panel .consultation-sheet-heading strong{font-size:15px}
html body.in-shop #consultant-panel .consultation-sheet :is(button,a){min-height:44px;padding:10px 12px;border-color:var(--consultant-line);font-size:12px;line-height:1.4;color:var(--consultant-ink)}
html body.in-shop #consultant-panel .consultation-sheet .consultation-primary{background:var(--consultant-yellow);border-color:#d0ba00;color:var(--consultant-ink)}
html body.in-shop #consultant-panel .consultation-sheet :is(input,textarea){min-height:44px;padding:10px;font-size:16px}

html body.in-shop #consultant-panel .consultant-composer{flex:none;min-height:0;padding:12px 16px;background:#fff;border-top:1px solid var(--consultant-line);box-shadow:0 -5px 20px #24242408;z-index:2}
html body.in-shop #consultant-panel #chat-status{margin:0 0 8px;padding:0;color:var(--consultant-muted);font-size:12px;line-height:1.4}
html body.in-shop #consultant-panel #chat-status:empty{display:none}
html body.in-shop #consultant-panel #chat-form{display:flex;align-items:center;flex:none;gap:8px;margin:0;padding:0;border:0;border-radius:0;background:#fff}
html body.in-shop #consultant-panel #chat-input{display:block;flex:1;min-width:0;width:100%;height:44px;min-height:44px;padding:10px 12px;border:1px solid var(--consultant-line);border-radius:12px;background:var(--consultant-neutral);color:var(--consultant-ink);font-size:16px;line-height:1.4}
html body.in-shop #consultant-panel #chat-input::placeholder{color:var(--consultant-muted)}
html body.in-shop #consultant-panel #chat-form :is(button,.icon-btn){display:grid;place-items:center;flex:0 0 44px;min-width:44px;width:44px;min-height:44px;height:44px;margin:0;padding:8px;border:1px solid var(--consultant-line);border-radius:12px;background:var(--consultant-neutral);color:var(--consultant-ink)}
html body.in-shop #consultant-panel #chat-form .send-button{background:var(--consultant-yellow);border-color:#d0ba00;font-size:25px}
html body.in-shop #consultant-panel #chat-form .icon-btn svg{width:22px;height:22px}

@media(max-width:760px){
 html body.in-shop #consultant-panel{inset:60px 8px max(8px,env(safe-area-inset-bottom));width:auto;max-width:none;max-height:none;border-radius:17px}
 html body.in-shop #consultant-panel .consultant-header{min-height:62px;padding:9px 12px;gap:8px}
 html body.in-shop #consultant-panel .consultant-header h2{font-size:15px}
 html body.in-shop #consultant-panel #consultant-close{font-size:11px;padding:9px 10px}
 html body.in-shop #consultant-panel .consultant-desk.is-compact{padding:8px 12px 0}
 html body.in-shop #consultant-panel .consultant-role{font-size:10px}
 html body.in-shop #consultant-panel #consultant-product-context{padding:9px 12px;gap:8px}
 html body.in-shop #consultant-panel .consultant-scroll{padding:12px}
 html body.in-shop #consultant-panel .consultant-composer{padding:10px 12px}
}
@media(max-width:359px){
 html body.in-shop #consultant-panel .consultant-header h2{font-size:14px}
 html body.in-shop #consultant-panel .consultant-header div>span{font-size:10px}
 html body.in-shop #consultant-panel #consultant-product-title{font-size:13px}
 html body.in-shop #consultant-panel #consultant-product-return{max-width:94px;font-size:11px}
 html body.in-shop #consultant-panel .consultant-role{font-size:10px}
 html body.in-shop #consultant-panel .chat-message{max-width:96%;font-size:13px}
 html body.in-shop #consultant-panel #chat-form{gap:6px}
}
@media(orientation:landscape) and (min-width:600px) and (max-height:600px){
 html body.in-shop #consultant-panel{inset:52px 8px 8px;width:auto;max-width:none;display:grid;grid-template-columns:220px minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr) auto;border-radius:16px}
 html body.in-shop #consultant-panel .consultant-header{grid-column:1/-1;grid-row:1;min-height:52px;padding:4px 12px}
 html body.in-shop #consultant-panel .consultant-desk.is-compact{grid-column:1;grid-row:2;padding:8px 10px 0}
 html body.in-shop #consultant-panel .consultant-role{font-size:9px}
 html body.in-shop #consultant-panel #consultant-product-context{grid-column:1;grid-row:3;padding:8px 10px;gap:6px;align-self:start}
 html body.in-shop #consultant-panel #consultant-product-title{font-size:12px}
 html body.in-shop #consultant-panel #consultant-product-return{max-width:82px;font-size:10px}
 html body.in-shop #consultant-panel .consultant-scroll{grid-column:2;grid-row:2/4;min-height:0;padding:10px 12px;border-left:1px solid var(--consultant-line)}
 html body.in-shop #consultant-panel .consultant-composer{grid-column:1/-1;grid-row:4;padding:7px 12px}
 html body.in-shop #consultant-panel .consultant-desk-options-body{max-height:calc(100dvh - 288px)}
}