/* Scoped, mobile-first additions; existing brand and customer data are preserved. */
.hg183-messenger,.hg183-form,.hg183-help,.hg183-dialog{--hg-ink:#203b30;--hg-muted:#58665d;--hg-border:#dedbcd;color:var(--hg-ink);font-family:inherit;font-size:1rem;line-height:1.7;box-sizing:border-box}
.hg183-messenger *,.hg183-form *,.hg183-dialog *{box-sizing:border-box;min-width:0}
.hg183-messenger{display:grid;grid-template-columns:1fr;gap:12px;margin:16px 0}.hg183-inbox,.hg183-chat{background:#fffefb;border:1px solid var(--hg-border);border-radius:16px;padding:14px;overflow:hidden}
.hg183-messenger h2{font-size:1.25rem;margin:0 0 8px}.hg183-messenger small{font-size:.85rem;color:#58665d}.hg183-messenger input,.hg183-messenger textarea,.hg183-messenger select,.hg183-form input,.hg183-form select,.hg183-dialog input{width:100%;max-width:100%;border:1px solid #b9bbae;border-radius:9px;padding:8px 10px;background:#fffefa;color:#203b30;font:inherit;min-height:44px}
.hg183-messenger button,.hg183-form button,.hg183-dialog button{font:inherit;min-height:44px;cursor:pointer;border:1px solid #b5a16c;border-radius:9px;background:#f4f0e3;color:#203b30;padding:7px 12px;max-width:100%}.hg183-messenger button:disabled,.hg183-form button:disabled{opacity:.6;cursor:wait}
.hg183-inbox [data-hg183-conversations]{max-height:190px;overflow:auto;overscroll-behavior:contain;display:grid;gap:4px;margin:8px 0}.hg183-inbox a{display:grid;grid-template-columns:1fr auto;text-decoration:none;color:#203b30;border:1px solid transparent;border-radius:10px;padding:8px}.hg183-inbox a small{grid-column:1}.hg183-inbox a span{grid-column:2;grid-row:1/3;align-self:center;border-radius:20px;background:#e7dfbf;padding:2px 9px}.hg183-inbox a[aria-current]{border-color:#9c8147;background:#f5f0de}
.hg183-chat>header{display:flex;align-items:center;justify-content:space-between;gap:8px;border-bottom:1px solid #dedbcd;padding-bottom:8px}.hg183-chat-tools{display:flex;gap:8px;align-items:end;margin:8px 0}.hg183-chat-tools label{flex:1}.hg183-chat-tools button{font-size:.85rem}.hg183-stream{height:42dvh;min-height:240px;max-height:600px;overflow:auto;overscroll-behavior:contain;padding:6px;display:flex;flex-direction:column;gap:10px;scrollbar-gutter:stable}.hg183-message{background:#f1f3ed;border:1px solid #d4dbcf;border-radius:12px;padding:10px;max-width:94%;align-self:flex-start;overflow-wrap:anywhere}.hg183-message.mine{background:#f5efdc;border-color:#d6c79d;align-self:flex-end}.hg183-message p{white-space:pre-wrap;margin:6px 0}.hg183-message strong{font-size:.9rem}.hg183-message>small,.hg183-message>a{display:block}.hg183-message a{color:#6b542b;text-decoration:underline}.hg183-message img,.hg183-message video{display:block;max-width:100%;max-height:240px;object-fit:contain;border-radius:8px;margin:8px 0}.hg183-message audio{display:block;max-width:100%;margin:8px 0}.hg183-message-tools{display:flex;gap:5px;flex-wrap:wrap;margin-top:5px}.hg183-message-tools button{font-size:.85rem;min-height:36px;padding:3px 9px}
.hg183-composer{border-top:1px solid #dedbcd;padding-top:10px}.hg183-composer>div{display:flex;gap:8px;flex-wrap:wrap;margin:8px 0}.hg183-composer textarea{resize:vertical;max-height:180px}.hg183-attach{position:relative;display:inline-flex;align-items:center;min-height:44px;border:1px solid #b5a16c;border-radius:9px;padding:7px 12px;overflow:hidden;cursor:pointer}.hg183-attach input{position:absolute;inset:0;opacity:0;cursor:pointer}.hg183-upload{display:grid;gap:4px;grid-template-columns:1fr auto auto;border:1px solid #b9bbae;border-radius:8px;padding:8px;margin:6px 0;overflow-wrap:anywhere}.hg183-upload progress,.hg183-upload small{grid-column:1/-1;max-width:100%;width:100%}
.hg183-help{border:1px solid #dedbcd;border-radius:12px;background:#f7f5ec;margin:12px 0}.hg183-help>summary{cursor:pointer;display:flex;justify-content:space-between;padding:10px 14px;min-height:44px;font-weight:bold}.hg183-help>div{padding:0 14px 12px}.hg183-help h3{font-size:1.05rem;margin:10px 0 3px}.hg183-help p{margin:0}.hg183-form{display:grid;gap:12px;margin:12px 0}.hg183-form label{display:grid;gap:4px}.hg183-form label:has(input[type=checkbox]){display:flex;align-items:center}.hg183-form input[type=checkbox]{width:22px;min-height:22px}.hg183-risk{border:1px solid #dcbe8f;border-right:4px solid #a76626;border-radius:10px;padding:12px;margin:10px 0;background:#fff9ed}.hg183-risk[data-risk^="9"],.hg183-risk[data-risk^="8"]{background:#fff2f0;border-color:#c77b70}.hg183-risk>header{display:flex;gap:10px;justify-content:space-between}.hg183-secret{display:block;overflow-wrap:anywhere;background:#f3eedc;padding:12px;direction:ltr;text-align:left;user-select:all}
.hg183-dialog{border:1px solid #b5a16c;border-radius:16px;background:#fffefa;max-width:min(92vw,430px);padding:22px;box-shadow:0 15px 60px #0004}.hg183-dialog::backdrop{background:#182b24aa}.hg183-dialog form{display:grid;gap:12px}.hg183-dialog h2{font-size:1.4rem;margin:0}.hg183-dialog a{color:#665027;text-decoration:underline}.hg183-loan table{width:100%;border-collapse:collapse}.hg183-loan td,.hg183-loan th{padding:6px;border:1px solid #d6d2c4}.hg183-loan [data-hg183-loan-preview]{border-right:3px solid #ad9154;padding:8px}.hg183-loan [data-hg183-loan-preview]:empty{display:none}
.hg183-messenger :focus-visible,.hg183-form :focus-visible,.hg183-dialog :focus-visible,.hg183-help :focus-visible{outline:3px solid #267666;outline-offset:3px}.hg183-messenger [hidden]{display:none!important}
@media(min-width:900px){.hg183-messenger{grid-template-columns:minmax(220px,28%) minmax(0,1fr)}.hg183-inbox [data-hg183-conversations]{max-height:570px}.hg183-stream{height:50dvh}.hg183-form{grid-template-columns:repeat(2,minmax(0,1fr))}.hg183-form>button,.hg183-form>p{grid-column:1/-1}}
@media(max-width:480px){.hg183-messenger{margin:8px 0;gap:8px}.hg183-inbox,.hg183-chat{padding:10px}.hg183-inbox [data-hg183-conversations]{max-height:130px}.hg183-chat-tools{flex-wrap:wrap}.hg183-message{max-width:98%}.hg183-composer>small{font-size:.8rem}.hg183-risk>header{display:block}.hg183-help>div{padding:0 10px 10px}}
@media(prefers-reduced-motion:reduce){.hg183-messenger *{scroll-behavior:auto!important;animation:none!important;transition:none!important}}
@media print{.hg183-contract button,.hg155-sidebar,.hg155-header{display:none!important}.hg183-contract{border:0!important;box-shadow:none!important}}
/* Override older full-width form rules only inside the new messenger. */
.gold1-customer-app .hg183-messenger button{width:auto;max-width:100%;flex-shrink:0}
.gold1-customer-app .hg183-chat-tools>label{flex:1 1 200px;width:auto;min-width:130px}
.gold1-customer-app .hg183-chat-tools>button{flex:0 0 auto;width:auto}
.gold1-customer-app .hg183-inbox a span{grid-column:auto;grid-row:auto;background:transparent;padding:0;border-radius:0}
.gold1-customer-app .hg183-inbox a>span{grid-column:2;grid-row:1/3;align-self:center;background:#e7dfbf;padding:2px 9px;border-radius:20px}
.gold1-customer-app .hg183-messenger label{margin:0;max-width:100%}
.gold1-customer-app .hg183-messenger .hg183-stream{display:flex;flex-direction:column}
