.h88-rich-toolbar{display:flex;align-items:center;gap:7px;flex-wrap:wrap;grid-column:1/-1;position:relative}.h88-rich-toolbar>small{font-size:11px;line-height:1.4;color:#64696f;flex-basis:100%}.h88-rich-toolbar button,.h88-private-media button{min-height:36px!important;font:inherit!important;font-size:12px!important;border:1px solid #d8d8d8!important;border-radius:8px!important;background:#fff!important;color:#24292e!important;padding:6px 10px!important;cursor:pointer}.h88-rich-toolbar button:disabled{opacity:.5;cursor:default}.h88-attachment-label{overflow-wrap:anywhere}.h88-product-picker{background:#fff;border:1px solid #c9cdd1;border-radius:10px;padding:10px;flex-basis:100%;max-height:260px;overflow:auto}.h88-product-picker[hidden]{display:none}.h88-product-picker input{width:100%;margin-bottom:7px}.h88-product-results{display:grid;gap:8px;margin-top:8px}.h88-product-card{background:#fff;color:#23282d;border:1px solid #dfe3e6;border-radius:10px;padding:10px;display:grid;gap:6px;max-width:300px;margin-top:8px;overflow-wrap:anywhere}.h88-product-card img{width:100px;height:100px;object-fit:contain;background:#fff}.h88-product-card strong,.h88-product-card span,.h88-product-card small{display:block}.h88-product-card small{font-size:11px;color:#646970}.h88-product-card a,.h88-private-media a{color:#164cac!important;text-decoration:underline!important}.h88-private-media{display:grid;gap:7px;margin-top:8px}.h88-private-media>img{display:block;max-width:100%;max-height:300px;object-fit:contain;border-radius:8px}.h88-private-media small{font-size:11px}.h88-chat-form .h88-rich-toolbar{order:4}.h88-chat-panel{max-height:calc(100dvh - 24px)}.h88-chat-form textarea{min-height:52px}

/* Customer attachments are in the expandable tray; staff controls remain unchanged. */
.h88-chat-form .h88-customer-tools{display:contents}
.h88-chat-form .h88-customer-tools .h88-plus-toggle{grid-column:1;grid-row:1;width:44px;min-width:44px;height:44px;border-radius:50%!important;border:0!important;background:transparent!important;font-size:30px!important;padding:0!important;color:#687079!important}
.h88-chat-form .h88-options-tray{grid-column:1/-1;grid-row:4;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px 8px;padding:18px 8px 12px;background:#f7f7f7;border-radius:12px;max-height:220px;overflow:auto;overscroll-behavior:contain}
.h88-chat-form .h88-options-tray[hidden]{display:none!important}
.h88-chat-form .h88-options-tray .h88-option{display:flex;flex-direction:column;align-items:center;align-self:stretch;justify-content:flex-start;gap:7px;padding:0!important;min-width:0;border:0!important;background:transparent!important;color:#656b70!important;text-decoration:none!important;font-size:12px!important;line-height:1.25;text-align:center}
.h88-option-icon{display:flex;align-items:center;justify-content:center;width:56px;height:56px;border:1px solid #e4e4e4;border-radius:14px;background:white;font-size:31px;line-height:1;color:#646a70}
.h88-chat-form .h88-customer-tools>small{grid-column:1/-1;margin:0;line-height:1.35;font-size:10px}
.h88-chat-form .h88-customer-tools>small:empty{display:none}
.h88-chat-form .h88-attachment-label{grid-row:2}
.h88-chat-form .h88-customer-tools>button:not(.h88-plus-toggle){grid-column:1/-1;justify-self:start;grid-row:3}
.h88-chat-form .h88-customer-tools>small:not(.h88-attachment-label){grid-row:5;color:#72777d}
.h88-chat-layer.is-short .h88-options-tray{max-height:132px;padding:8px}
.h88-chat-layer.is-short .h88-customer-tools>small:not(.h88-attachment-label){display:none}

.h88-chat-form .h88-options-tray{max-height:min(220px,max(64px,calc(var(--h88-chat-viewport,100dvh) - 260px)))}

/* Keyboard-short viewports: this must outrank the earlier .is-short tray cap. */
.h88-chat-layer.is-short .h88-chat-form .h88-options-tray{max-height:min(132px,max(24px,calc(var(--h88-chat-viewport,100dvh) - 240px)))}
/* Warm customer conversation skin. Visual-only; keep viewport and tray sizing rules. */
#h88-customer-chat{--h88-warm-ink:#3d342f;--h88-warm-muted:#706159;--h88-warm-line:#e9ded3;--h88-warm-red:#c90020;--h88-warm-cream:#fffaf3}
#h88-customer-chat .h88-chat-backdrop{background:rgb(48 35 29 / 30%)}
#h88-customer-chat .h88-chat-panel{background:var(--h88-warm-cream);border-color:var(--h88-warm-line);box-shadow:0 16px 52px rgb(70 43 25 / 18%);color:var(--h88-warm-ink)}
#h88-customer-chat.is-fullscreen .h88-chat-panel{box-shadow:none}
#h88-customer-chat .h88-chat-heading{background:#fffaf3;border-bottom-color:#eadbcb;box-shadow:inset 0 3px 0 #f5ca69}
#h88-customer-chat .h88-chat-heading h2{color:#3d342f}
#h88-customer-chat .h88-chat-heading [data-h88-chat-close]{color:var(--h88-warm-red);border-radius:50%}
#h88-customer-chat .h88-chat-intro,#h88-customer-chat .h88-chat-privacy{background:var(--h88-warm-cream);color:var(--h88-warm-muted)}
#h88-customer-chat .h88-chat-messages{background:#f7f1e9;scrollbar-color:#c9b7a7 #f7f1e9}
#h88-customer-chat .h88-chat-message{background:#fffdf9;border-color:#e8dcd0;border-radius:18px 18px 18px 6px;box-shadow:0 2px 4px rgb(82 55 31 / 3%)}
#h88-customer-chat .h88-chat-message.is-customer{background:#fff0e8;border-color:#f0d4c6;border-radius:18px 18px 6px 18px}
#h88-customer-chat .h88-chat-message p{color:var(--h88-warm-ink)}
#h88-customer-chat .h88-chat-message small,#h88-customer-chat .h88-chat-message time,#h88-customer-chat .h88-chat-message.is-deleted p{color:var(--h88-warm-muted)}
#h88-customer-chat .h88-chat-message .h88-message-action{color:#805246}
#h88-customer-chat .h88-chat-earlier{background:#fffaf3;color:#9c2632}
#h88-customer-chat .h88-chat-status{color:var(--h88-warm-muted)}
#h88-customer-chat .h88-chat-status.is-error{color:#ab1730}
#h88-customer-chat .h88-chat-form{background:#fffaf6;border-top-color:var(--h88-warm-line)}
#h88-customer-chat .h88-chat-form textarea{background:#fffefd;border-color:#c8b8aa;color:var(--h88-warm-ink);box-shadow:0 2px 4px rgb(70 43 25 / 3%)}
#h88-customer-chat .h88-chat-form textarea::placeholder{color:#776960;opacity:1}
#h88-customer-chat .h88-chat-form>[type=submit]{background:var(--h88-warm-red);color:#fff;box-shadow:0 3px 8px rgb(170 32 37 / 12%)}
#h88-customer-chat .h88-chat-form>[type=submit]:disabled{background:#eedbd2;color:#77645a;opacity:1;box-shadow:none}
#h88-customer-chat .h88-chat-form .h88-emoji-toggle{background:#fff2d5;color:#725840}
#h88-customer-chat .h88-chat-form .h88-customer-tools .h88-plus-toggle{background:#f8eadf!important;color:#84513d!important}
#h88-customer-chat .h88-chat-form .h88-options-tray{background:#f7eee4;border:1px solid #eadbcb}
#h88-customer-chat .h88-chat-form .h88-options-tray .h88-option{color:#705d51!important}
#h88-customer-chat .h88-option-icon{background:#fffaf3;border-color:#e5d3bf;color:#84513d;box-shadow:0 2px 5px rgb(82 55 31 / 4%)}
#h88-customer-chat .h88-chat-form .h88-emoji-picker{background:#fffaf3;border-color:#e5d3bf;box-shadow:0 6px 20px rgb(82 55 31 / 13%)}
#h88-customer-chat .h88-chat-form .h88-emoji-picker button{border-radius:10px}
#h88-customer-chat .h88-chat-form .h88-customer-tools>small,#h88-customer-chat .h88-chat-session-note{color:var(--h88-warm-muted)}
#h88-customer-chat .h88-chat-session-note{background:#fffaf6}
#h88-customer-chat .h88-private-media button,#h88-customer-chat .h88-customer-tools>button:not(.h88-plus-toggle){background:#fffdf9!important;border-color:#d6bba8!important;color:#754835!important;border-radius:12px!important}
#h88-customer-chat .h88-private-media>img{border-radius:12px}
#h88-customer-chat .h88-product-card{background:#fffdf9;border-color:#e3d5c7;border-radius:14px;color:var(--h88-warm-ink)}
#h88-customer-chat .h88-product-card small{color:var(--h88-warm-muted)}
#h88-customer-chat .h88-product-card a,#h88-customer-chat .h88-private-media a{color:#9c2632!important}
#h88-customer-chat .h88-chat-panel :focus-visible{outline-color:#a33222}
@media(hover:hover){
 #h88-customer-chat .h88-chat-heading [data-h88-chat-close]:hover,#h88-customer-chat .h88-chat-form .h88-emoji-picker button:hover{background:#f8eadf}
 #h88-customer-chat .h88-chat-form>[type=submit]:not(:disabled):hover{background:#aa001b}
 #h88-customer-chat .h88-option:hover .h88-option-icon{background:#fff1d5;border-color:#cba472}
}
/* Five attachment choices fit the narrowest supported customer viewport. */
#h88-customer-chat .h88-chat-form .h88-options-tray{grid-template-columns:repeat(5,minmax(0,1fr));column-gap:6px;border:0;box-shadow:inset 0 0 0 1px #eadbcb}
#h88-customer-chat .h88-option-icon{width:44px;height:44px;box-sizing:border-box;font-size:26px}
@media(max-width:360px){#h88-customer-chat .h88-chat-form .h88-options-tray .h88-option{font-size:11px!important}}
/* v52: compact, factual product recommendation. No offer or price calculation changes. */
.h88-product-card{box-sizing:border-box;width:100%;max-width:360px;grid-template-columns:minmax(0,1fr);gap:10px;padding:12px;border-radius:12px;background:#fff;box-shadow:0 2px 8px rgb(50 35 20 / 5%)}
.h88-product-card.has-product-image{grid-template-columns:minmax(72px,30%) minmax(0,1fr)}
.h88-product-card>img{display:block;width:100%;height:auto;aspect-ratio:1;object-fit:contain;border:1px solid #f0ece7;border-radius:8px;box-sizing:border-box}
.h88-product-card .h88-product-summary{display:flex;flex-direction:column;justify-content:center;gap:8px;min-width:0}
.h88-product-card .h88-product-title{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;font-size:14px;line-height:1.4;font-weight:650;color:#302925}
.h88-product-card .h88-product-price{font-size:17px;line-height:1.3;font-weight:750;color:#b4001d;overflow-wrap:anywhere}
.h88-product-card .h88-product-stock{color:#80513e;font-size:11px}
.h88-product-card .h88-product-price-note{grid-column:1/-1;font-size:10px;line-height:1.45;color:#74655b}
.h88-product-card .h88-product-cta,#h88-customer-chat .h88-product-card .h88-product-cta{grid-column:1/-1;display:flex;align-items:center;justify-content:center;min-height:42px;padding:7px 12px;box-sizing:border-box;background:#c90020;color:#fff!important;border-radius:7px;text-decoration:none!important;font-size:13px;line-height:1.3;font-weight:700}
.h88-product-card>button{grid-column:1/-1}
#h88-customer-chat .h88-product-card{background:#fff;border-color:#ebdfd3;border-radius:12px}
#h88-customer-chat .h88-chat-message:has(>.h88-product-card){width:min(360px,100%);max-width:100%;box-sizing:border-box;padding:10px;background:#fffdf9}
.h88-product-card .h88-product-cta:focus-visible{outline:2px solid #6c0013;outline-offset:3px}
@media(hover:hover){.h88-product-card .h88-product-cta:hover{background:#a9001b}}
@media(max-width:360px){.h88-product-card{padding:10px;gap:8px}.h88-product-card .h88-product-title{font-size:13px}.h88-product-card .h88-product-price{font-size:15px}}

/* v53: separate only verified member/standard labels from their unchanged amounts. */
.h88-product-card .h88-product-price.has-dual-price{display:flex;flex-direction:column;gap:5px}
.h88-product-card .h88-product-price-row{display:flex;flex-wrap:wrap;align-items:baseline;column-gap:6px;row-gap:1px;line-height:1.3}
.h88-product-card .h88-product-price-label{font-size:10px;font-weight:600;letter-spacing:.01em;color:#756359}
.h88-product-card .h88-product-price-amount{font:inherit;color:inherit;white-space:nowrap}
.h88-product-card .h88-product-price-row.is-standard{font-size:12px;font-weight:500;color:#74655b}
.h88-product-card .h88-product-price-row.is-standard .h88-product-price-label{font-size:10px;font-weight:500}

/* v54: WhatsApp-inspired conversation rhythm with 88Hardware's own warm/red identity.
   All rules are customer-scoped; staff inbox and real media/auth actions stay unchanged. */
#h88-customer-chat .h88-chat-panel{width:min(480px,calc(100vw - 32px));background:#f8f3eb}
#h88-customer-chat .h88-chat-heading{min-height:66px;box-sizing:border-box;gap:9px;padding:8px 12px;background:#fffaf4;border-bottom:1px solid #e9ded2;box-shadow:none;position:relative;z-index:4}
#h88-customer-chat .h88-chat-heading [data-h88-chat-close]{width:32px;min-width:32px;height:44px;font-size:26px;color:#875345;order:0}
#h88-customer-chat .h88-chat-avatar{flex:0 0 40px;height:40px;display:flex;align-items:center;justify-content:center;background:#c90020;color:#fff;border-radius:50%;font-size:20px;font-weight:800;letter-spacing:-1.5px;box-shadow:inset 0 0 0 2px #fff5}
#h88-customer-chat .h88-chat-identity{flex:1;min-width:0}
#h88-customer-chat .h88-chat-identity h2{font-size:16px!important;font-weight:700;line-height:1.2;color:#3a302b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#h88-customer-chat .h88-chat-identity>span{display:block;font-size:11px;line-height:1.35;color:#7c6c60;margin-top:3px}
#h88-customer-chat .h88-chat-heading .h88-chat-info-toggle{width:40px;min-width:40px;height:40px;font-family:Georgia,serif;font-size:21px;font-style:italic;font-weight:700;color:#785f50;border:1px solid #dacabe;border-radius:50%;background:#fffdf9}
#h88-customer-chat .h88-chat-information{position:absolute;z-index:6;top:70px;left:12px;right:12px;max-height:calc(var(--h88-chat-viewport,100dvh) - 155px);overflow:auto;overscroll-behavior:contain;box-sizing:border-box;padding:16px;background:#fffdf9;border:1px solid #e4d3c3;border-radius:16px;box-shadow:0 8px 32px #51371826}
#h88-customer-chat .h88-chat-information>strong{display:block;font-size:14px;padding-right:35px;margin-bottom:12px}
#h88-customer-chat .h88-chat-info-close{position:absolute;right:8px;top:5px;width:40px;height:40px;border:0;background:transparent;font-size:26px;color:#785f50;cursor:pointer}
#h88-customer-chat .h88-chat-information .h88-chat-intro,#h88-customer-chat .h88-chat-information .h88-chat-privacy,#h88-customer-chat .h88-chat-information .h88-chat-session-note,#h88-customer-chat .h88-chat-information>small{display:block;margin:0 0 12px;padding:0;background:none;font-size:12px;line-height:1.5;color:#6f6055}
#h88-customer-chat .h88-chat-information>:last-child{margin-bottom:0}
#h88-customer-chat .h88-chat-messages{padding:8px 14px 16px;background-color:#f4eee5;background-image:radial-gradient(#c9b9a626 .8px,transparent .8px);background-size:14px 14px;scrollbar-width:thin}
#h88-customer-chat .h88-chat-messages:empty:before{content:'Welcome to 88HARDWARE';display:block;margin:28px auto 8px;text-align:center;font-size:16px;font-weight:650;color:#584b42}
#h88-customer-chat .h88-chat-messages:empty:after{content:'Ask about a product or share a photo.\A Replies from our team appear here.';white-space:pre-line;display:block;text-align:center;max-width:270px;margin:auto;font-size:13px;line-height:1.6;color:#807267}
#h88-customer-chat .h88-chat-date{display:flex;justify-content:center;margin:10px 0 16px;clear:both}
#h88-customer-chat .h88-chat-date>span{padding:5px 10px;background:#fffcf6e6;box-shadow:0 1px 3px #4d382915;border:1px solid #e5dacb70;border-radius:8px;color:#776557;font-size:10px;line-height:1.3}
#h88-customer-chat .h88-chat-message{box-sizing:border-box;max-width:86%;margin-bottom:10px;padding:8px 10px 5px;border:0;border-radius:4px 15px 15px 15px;background:#fffdf9;box-shadow:0 1px 2px #4b342d18}
#h88-customer-chat .h88-chat-message.is-customer{background:#f9ddd1;border:0;border-radius:15px 4px 15px 15px}
#h88-customer-chat .h88-chat-message.is-grouped{margin-top:-6px;border-top-left-radius:15px}
#h88-customer-chat .h88-chat-message.is-customer.is-grouped{border-top-right-radius:15px}
#h88-customer-chat .h88-chat-message>small:first-child{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
#h88-customer-chat .h88-chat-message>p{font-size:14px;line-height:1.48;margin:0!important}
#h88-customer-chat .h88-chat-message>p:empty{display:none}
#h88-customer-chat .h88-message-meta{display:flex;flex-wrap:wrap;align-items:center;justify-content:flex-end;gap:4px 10px;min-height:16px;margin-top:3px}
#h88-customer-chat .h88-message-meta time{font-size:10px;line-height:1.35;color:#806b5e;white-space:nowrap}
#h88-customer-chat .h88-message-meta .h88-message-action{padding:3px 2px;min-height:28px;min-width:28px;line-height:1.2;margin:-2px 0;font-size:10px;color:#8a6554;order:-1}
#h88-customer-chat .h88-chat-earlier{min-height:32px;font-size:11px;background:#f8f3eb;border:0;border-bottom:1px solid #e9ded2}
#h88-customer-chat .h88-chat-status{background:#fffaf5;margin:0;padding:5px 14px;font-size:11px;line-height:1.3;max-height:50px;overflow:auto}
#h88-customer-chat .h88-chat-status:empty{display:none;padding:0}
#h88-customer-chat .h88-chat-form{grid-template-columns:40px minmax(0,1fr) 44px;align-items:end;column-gap:6px;row-gap:6px;padding:8px 10px max(8px,env(safe-area-inset-bottom));background:#fffaf5;border-top:1px solid #e9ded2}
#h88-customer-chat .h88-chat-form textarea{grid-column:2;grid-row:1;min-height:44px!important;max-height:112px;height:44px;resize:none;border:1px solid #ddcec2;background:#fffefd;border-radius:23px;box-shadow:none;padding:10px 12px;line-height:22px;font-size:16px;overflow-y:auto}
#h88-customer-chat.has-chat-emoji .h88-chat-form textarea{padding-right:43px}
#h88-customer-chat .h88-chat-form .h88-emoji-toolbar{grid-column:2;grid-row:1;justify-self:end;align-self:end;width:40px;margin:0 3px 2px 0;z-index:1}
#h88-customer-chat .h88-chat-form .h88-emoji-toggle{width:40px;min-width:40px;height:40px;min-height:40px;background:transparent;font-size:25px;color:#8c786b;padding:0;border:0;border-radius:50%;line-height:1}
#h88-customer-chat .h88-chat-form .h88-customer-tools .h88-plus-toggle{grid-column:1;grid-row:1;width:40px;min-width:40px;height:44px;min-height:44px;background:transparent!important;color:#87614d!important;font-size:29px!important;line-height:1}
#h88-customer-chat .h88-chat-form>[type=submit]{grid-column:3;grid-row:1;width:44px;min-width:44px;height:44px;min-height:44px;align-self:end;padding:0;border:0;border-radius:50%;font-size:0;line-height:1;background:#c90020;box-shadow:none}
#h88-customer-chat .h88-chat-form>[type=submit]:before{content:'';display:block;width:22px;height:22px;margin:auto;background:currentColor;clip-path:polygon(8% 7%,96% 50%,8% 93%,22% 56%,66% 50%,22% 44%)}
#h88-customer-chat .h88-chat-form>[type=submit].is-retry{font-size:11px}
#h88-customer-chat .h88-chat-form>[type=submit].is-retry:before{display:none}
#h88-customer-chat:not(.has-chat-rich) .h88-chat-form{grid-template-columns:minmax(0,1fr) 44px}
#h88-customer-chat:not(.has-chat-rich) .h88-chat-form textarea,#h88-customer-chat:not(.has-chat-rich) .h88-chat-form .h88-emoji-toolbar{grid-column:1}
#h88-customer-chat:not(.has-chat-rich) .h88-chat-form>[type=submit]{grid-column:2}
#h88-customer-chat .h88-chat-form .h88-options-tray{position:absolute;left:10px;right:10px;bottom:calc(100% + 8px);z-index:3;grid-template-columns:repeat(5,minmax(0,1fr));gap:8px 5px;padding:16px 8px;background:#fffbf5;border:1px solid #e7d8c8;border-radius:17px;box-shadow:0 7px 28px #50382325;max-height:min(235px,max(72px,calc(var(--h88-chat-viewport,100dvh) - 158px)))}
#h88-customer-chat .h88-chat-form .h88-emoji-picker{left:10px;right:10px;bottom:calc(100% + 8px);z-index:3;border-radius:17px;max-height:min(264px,max(88px,calc(var(--h88-chat-viewport,100dvh) - 158px)))}
#h88-customer-chat .h88-chat-form .h88-option-icon{width:44px;height:44px;border-radius:14px;background:#f8ede2;box-shadow:none}
#h88-customer-chat .h88-chat-form .h88-options-tray .h88-option{font-size:10px!important;gap:6px}
#h88-customer-chat .h88-chat-form .h88-customer-tools>.h88-attachment-label{font-size:11px;max-height:42px;overflow:auto}
#h88-customer-chat .h88-chat-form .h88-customer-tools>button:not(.h88-plus-toggle){min-height:28px!important;padding:4px 8px!important;font-size:11px!important}
#h88-customer-chat .h88-chat-latest{position:absolute;right:14px;width:36px;height:36px;min-height:36px;border-radius:50%;border:1px solid #e1d2c3;background:#fffdf8;color:#835c49;box-shadow:0 2px 8px #51372322;font-size:22px;z-index:2;cursor:pointer}
#h88-customer-chat .h88-chat-message:has(>.h88-product-card){width:min(320px,88%);max-width:88%;padding:6px;background:#fffdf9}
#h88-customer-chat .h88-product-card{padding:7px;gap:8px;margin-top:0;border:0;border-radius:10px;box-shadow:none;background:transparent}
#h88-customer-chat .h88-product-card.has-product-image{grid-template-columns:minmax(66px,29%) minmax(0,1fr)}
#h88-customer-chat .h88-product-card .h88-product-summary{gap:5px}
#h88-customer-chat .h88-product-card .h88-product-title{font-size:13px;line-height:1.35}
#h88-customer-chat .h88-product-card .h88-product-price{font-size:15px;line-height:1.25}
#h88-customer-chat .h88-product-card .h88-product-price-row.is-standard{font-size:11px}
#h88-customer-chat .h88-product-card .h88-product-price-note{font-size:10px;line-height:1.4}
#h88-customer-chat .h88-product-card .h88-product-cta{min-height:38px;font-size:12px;border-radius:8px}
#h88-customer-chat .h88-private-media{margin-top:2px;gap:5px}
#h88-customer-chat .h88-private-media button{min-height:38px!important;font-size:12px!important}
#h88-customer-chat .h88-private-media small{font-size:10px;line-height:1.35}
#h88-customer-chat.is-fullscreen .h88-chat-panel{width:100%}
#h88-customer-chat.is-fullscreen .h88-chat-heading{padding-top:max(8px,env(safe-area-inset-top));padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}
#h88-customer-chat.is-fullscreen .h88-chat-form{padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}
#h88-customer-chat.is-short .h88-chat-heading{min-height:56px;padding-top:5px;padding-bottom:5px}
#h88-customer-chat.is-short .h88-chat-information{top:60px;max-height:calc(var(--h88-chat-viewport,100dvh) - 124px)}
#h88-customer-chat.is-short .h88-chat-form .h88-options-tray{max-height:max(72px,calc(var(--h88-chat-viewport,100dvh) - 130px));padding-top:10px;padding-bottom:10px}
#h88-customer-chat.is-short .h88-chat-form .h88-emoji-picker{max-height:max(88px,calc(var(--h88-chat-viewport,100dvh) - 130px))}
@media(max-width:360px){#h88-customer-chat .h88-chat-messages{padding-left:10px;padding-right:10px}#h88-customer-chat .h88-chat-form{column-gap:4px}#h88-customer-chat .h88-chat-message:has(>.h88-product-card){max-width:94%;width:94%}}
/* Measure tray room from the actual composer/header, including expanded drafts and safe areas. */
#h88-customer-chat .h88-chat-form:has(.h88-options-tray:not([hidden])) textarea,#h88-customer-chat .h88-chat-form:has(.h88-emoji-picker:not([hidden])) textarea{max-height:44px!important}
#h88-customer-chat .h88-chat-form .h88-options-tray,#h88-customer-chat.is-short .h88-chat-form .h88-options-tray{box-sizing:border-box;max-height:min(235px,var(--h88-chat-overlay-room,160px))}
#h88-customer-chat .h88-chat-form .h88-emoji-picker,#h88-customer-chat.is-short .h88-chat-form .h88-emoji-picker{box-sizing:border-box;max-height:min(264px,var(--h88-chat-overlay-room,160px))}

/* v55: only the conversation and popovers may scroll, never the fixed dialog frame.
   Anchor visually hidden sender labels inside their own bubble, so old messages
   cannot contribute absolute-position overflow outside the conversation scroller. */
#h88-customer-chat .h88-chat-panel{overflow:hidden;overflow:clip}
#h88-customer-chat .h88-chat-messages{position:relative}
#h88-customer-chat .h88-chat-message{position:relative}
#h88-customer-chat .h88-chat-message>small:first-child{top:0;left:0}
/* v56: composer popovers sit above scroll-to-latest, below header/information. */
#h88-customer-chat .h88-chat-form{z-index:3}

/* Compact contextual controls; the hit area remains at least 44px. */
.h88-message-actions{position:relative;display:inline-flex;align-self:center;flex-shrink:0;vertical-align:middle}
.h88-message-menu-toggle{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;min-height:44px;padding:0;border:0;border-radius:50%;background:transparent;color:inherit;font:700 18px/1 sans-serif;cursor:pointer;margin:-12px -8px}
.h88-message-menu-toggle:focus-visible,.h88-message-menu button:focus-visible,.h88-reply-composer button:focus-visible{outline:2px solid #ad001c;outline-offset:2px}
.h88-message-menu{position:absolute;right:0;bottom:calc(100% + 12px);z-index:8;min-width:150px;padding:4px;background:#fffdf9;color:#422e24;border:1px solid #dfcdbc;border-radius:12px;box-shadow:0 5px 20px #32201026}
.h88-message-menu[hidden],.h88-reply-composer[hidden]{display:none!important}
.h88-message-menu button{display:block;box-sizing:border-box;width:100%;min-height:44px;padding:10px 14px;text-align:left;font:inherit;border:0;border-radius:8px;background:transparent;color:inherit;cursor:pointer}
.h88-message-menu button:hover,.h88-message-menu-toggle:hover{background:#f7eee4}
.h88-chat-message,.h88-inbox-message{touch-action:pan-y pinch-zoom}
.h88-message-quote{display:flex;flex-direction:column;gap:3px;border:0;border-left:3px solid #ac7759;border-radius:5px;background:#9c765815;margin:0 0 6px;padding:6px 9px;font-size:12px;line-height:1.35;overflow-wrap:anywhere}
.h88-message-quote strong{font-size:11px}.h88-message-quote span{white-space:pre-wrap;max-height:3.9em;overflow:hidden}
.h88-reply-composer{display:flex;align-items:center;grid-column:1/-1;order:-10;gap:8px;padding:7px 8px 7px 12px;border-left:3px solid #ac7759;background:#fbf2e8;border-radius:6px;min-width:0;margin-bottom:6px;flex-basis:100%;color:#493127}
.h88-reply-composer>div{min-width:0;flex:1;display:flex;flex-direction:column;gap:3px;font-size:12px;line-height:1.3}
.h88-reply-composer span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.h88-reply-composer strong{font-size:12px}
.h88-reply-composer button{width:44px;min-width:44px;height:44px;min-height:44px;border:0;border-radius:50%;background:transparent;color:inherit;font:24px/1 sans-serif;cursor:pointer}
#h88-customer-chat .h88-chat-form>.h88-reply-composer{position:relative;width:auto;inset:auto}
#h88-customer-chat .h88-chat-form>.h88-reply-composer{grid-row:1}
#h88-customer-chat .h88-chat-form:has(>.h88-reply-composer:not([hidden])) textarea,
#h88-customer-chat .h88-chat-form:has(>.h88-reply-composer:not([hidden])) .h88-emoji-toolbar,
#h88-customer-chat .h88-chat-form:has(>.h88-reply-composer:not([hidden])) .h88-customer-tools .h88-plus-toggle,
#h88-customer-chat .h88-chat-form:has(>.h88-reply-composer:not([hidden]))>[type=submit]{grid-row:2}
.h88-message-menu{position:fixed;right:auto;bottom:auto;z-index:20;max-width:calc(100vw - 24px);max-height:calc(100dvh - 32px);overflow-y:auto}
#h88-chat-inbox .h88-inbox-form>.h88-reply-composer{grid-row:3;grid-column:1/-1;order:0}
#h88-chat-inbox .h88-inbox-form:has(>.h88-reply-composer:not([hidden]))>textarea,
#h88-chat-inbox .h88-inbox-form:has(>.h88-reply-composer:not([hidden]))>[type=submit]{grid-row:4}

/* Keep safe-area padding when a fullscreen tablet has a short visible viewport. */
#h88-customer-chat.is-fullscreen.is-short .h88-chat-heading{padding-top:max(5px,env(safe-area-inset-top));padding-left:max(8px,env(safe-area-inset-left));padding-right:max(8px,env(safe-area-inset-right))}

/* Bottom-docked buyer conversation; fullscreen retains the phone/tablet surface. */
#h88-customer-chat:not(.is-fullscreen) .h88-chat-panel{width:min(600px,calc(100vw - 32px));border-radius:14px 14px 0 0;border-bottom:0}
#h88-customer-chat:not(.is-fullscreen) .h88-capture-option{display:none!important}
#h88-customer-chat:not(.is-fullscreen) .h88-options-tray{grid-template-columns:repeat(3,minmax(0,1fr))}
#h88-customer-chat .h88-chat-heading .h88-chat-info-toggle{width:auto;min-width:48px;padding:0 8px;font-family:inherit;font-size:12px;font-style:normal;font-weight:500;border:0;border-radius:6px;background:transparent}

/* Buyer share picker: scoped overlay preserves composer and fullscreen dimensions. */
#h88-customer-chat .h88-customer-tools>.h88-product-picker{position:absolute;bottom:calc(100% + 8px);left:8px;right:8px;z-index:7;max-height:min(440px,var(--h88-chat-overlay-room,260px));overflow:auto;overscroll-behavior:contain;background:#fffaf3;border:1px solid #e9ded3;box-shadow:0 8px 24px #3d342f26;box-sizing:border-box}
#h88-customer-chat .h88-customer-tools>.h88-product-picker[hidden]{display:none!important}
#h88-customer-chat .h88-product-picker button{min-height:44px!important;margin:4px 4px 4px 0}
.h88-order-card{display:flex;flex-direction:column;gap:6px;overflow-wrap:anywhere}

.h88-product-picker .h88-order-detail-item{border-top:1px solid #e9ded3;padding:10px 0;overflow-wrap:anywhere}.h88-order-detail-item img,.h88-order-card>img{width:64px;height:64px;object-fit:contain}.h88-product-picker p{margin:6px 0;overflow-wrap:anywhere}.h88-product-picker h3,.h88-product-picker h4{margin:12px 0 8px}.h88-inbox-form .h88-product-picker{max-height:65vh}

/* Compact order summaries keep actions visible without showing private detail fields. */
.h88-order-header{display:flex;justify-content:space-between;align-items:baseline;gap:8px;flex-wrap:wrap}.h88-order-header>span{font-size:12px}.h88-order-preview{display:flex;gap:8px;align-items:center;min-width:0}.h88-order-preview>img{width:48px;height:48px;object-fit:contain;flex:none}.h88-order-preview-summary{display:flex;flex-direction:column;min-width:0;gap:3px}.h88-order-card time{font-size:11px;line-height:1.35;color:#706159}.h88-order-summary-total{font-weight:600}.is-picker-preview .h88-order-item-name{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:13px;line-height:1.3}.is-picker-preview .h88-order-item-variation{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:11px}.h88-card-actions{display:flex;gap:6px;flex-wrap:wrap;align-items:center}.is-picker-preview .h88-card-actions{position:sticky;bottom:0;background:#fffaf3;z-index:2;padding-top:4px;margin-top:0}.is-picker-preview .h88-card-actions button{flex:1;min-width:60px;white-space:nowrap;font-size:12px!important;padding:6px!important;margin:0!important;min-height:44px!important}.h88-product-picker[data-kind="order"]:not([hidden]){display:flex;flex-direction:column;overflow:hidden}.h88-product-picker[data-kind="order"]>.h88-product-results{overflow:auto;min-height:0;overscroll-behavior:contain}.h88-product-picker[data-kind="order"]>button{flex-shrink:0}.h88-product-picker .is-picker-preview{gap:5px;padding:8px;max-width:none}.h88-product-picker .is-picker-preview .h88-order-preview-summary{flex:1}.h88-product-picker .is-picker-preview .h88-card-actions{flex-shrink:0}
@media(max-height:480px){.is-picker-preview .h88-order-preview>img{width:36px;height:36px}.is-picker-preview .h88-order-item-name{-webkit-line-clamp:1}.is-picker-preview .h88-order-item-variation{display:none}.h88-product-picker .is-picker-preview{gap:3px}}

.h88-product-picker[hidden]{display:none!important}
/* Customer-only one-step picker. History cards, staff tools and media remain unchanged. */
#h88-customer-chat .h88-customer-tools>.h88-simple-picker:not([hidden]){display:flex;flex-direction:column;gap:0;padding:0;overflow:hidden;max-height:min(380px,var(--h88-chat-overlay-room,260px));background:#fff;border-radius:10px}
#h88-customer-chat .h88-simple-picker .h88-picker-heading{display:flex;align-items:center;justify-content:space-between;gap:8px;flex:none;padding:3px 8px 3px 12px;border-bottom:1px solid #eee7e0}
#h88-customer-chat .h88-simple-picker .h88-picker-heading>strong{font-size:13px;font-weight:600;color:#49392e}
#h88-customer-chat .h88-simple-picker .h88-picker-heading>button{width:36px;min-height:36px!important;margin:0;padding:0!important;border:0!important;background:transparent!important;font-size:22px!important}
#h88-customer-chat .h88-simple-picker .h88-picker-filter{display:flex;gap:6px;flex:none;padding:7px 10px;border-bottom:1px solid #eee7e0}
#h88-customer-chat .h88-simple-picker .h88-picker-filter:has(input[hidden]){display:none}
#h88-customer-chat .h88-simple-picker .h88-picker-filter>input{min-width:0;width:auto;flex:1;min-height:36px;margin:0;padding:5px 9px;border:1px solid #d6cdc4;border-radius:6px;background:#fff;font:inherit;font-size:13px;box-sizing:border-box}
#h88-customer-chat .h88-simple-picker .h88-picker-filter>button{min-height:36px!important;margin:0;padding:5px 8px!important;font-size:12px!important}
#h88-customer-chat .h88-simple-picker>.h88-product-results{display:block;flex:1 1 auto;min-height:0;margin:0;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
#h88-customer-chat .h88-simple-picker .h88-picker-row{display:grid;grid-template-columns:44px minmax(0,1fr) auto;align-items:center;gap:9px;padding:10px;border-bottom:1px solid #eee7e0;min-height:64px;box-sizing:border-box}
#h88-customer-chat .h88-simple-picker .h88-picker-row>img,#h88-customer-chat .h88-simple-picker .h88-picker-thumbnail{width:44px;height:44px;object-fit:contain;border-radius:4px;background:#f5f3ef;display:block}
#h88-customer-chat .h88-simple-picker .h88-picker-summary{min-width:0;display:grid;gap:4px}
#h88-customer-chat .h88-simple-picker .h88-picker-summary>strong{font-size:13px;line-height:1.3;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden;overflow-wrap:anywhere}
#h88-customer-chat .h88-simple-picker .h88-picker-price{font-size:12px;line-height:1.35;color:#8c4c2f;overflow-wrap:anywhere}
#h88-customer-chat .h88-simple-picker .h88-picker-price .h88-product-price-row{display:block;font-size:11px}
#h88-customer-chat .h88-simple-picker .h88-picker-price .h88-product-price-label{font-size:9px}
#h88-customer-chat .h88-simple-picker .h88-picker-row>button{margin:0;min-height:44px!important;min-width:52px;padding:5px 10px!important;border:0!important;border-radius:6px!important;background:#b65d34!important;color:#fff!important;font-size:12px!important}
#h88-customer-chat .h88-simple-picker>.h88-picker-status{flex:none;padding:10px 12px;margin:0;font-size:12px;line-height:1.4;color:#706159;text-align:center;overflow-wrap:anywhere}
#h88-customer-chat .h88-simple-picker>.h88-picker-status:empty{display:none}
#h88-customer-chat .h88-simple-picker>.h88-product-results:empty+.h88-picker-status{padding:32px 12px}
#h88-customer-chat .h88-simple-picker>button{flex:none;margin:0;border:0!important;border-radius:0!important;border-top:1px solid #eee7e0!important;min-height:36px!important;font-size:12px!important}
#h88-customer-chat .h88-simple-picker button:focus-visible,#h88-customer-chat .h88-simple-picker input:focus-visible{outline:2px solid #94613e;outline-offset:-2px}
@media(max-height:480px){#h88-customer-chat .h88-simple-picker .h88-picker-row{padding:6px 8px;min-height:56px}#h88-customer-chat .h88-simple-picker>.h88-product-results:empty+.h88-picker-status{padding:16px 10px}}
