.chat-badge{display:inline-flex;align-items:center;justify-content:center;min-width:23px;height:23px;border-radius:20px;padding:1px 6px;background:#d5354e;color:#fff;font-size:12px;line-height:1;margin-left:8px;vertical-align:middle}.chat-badge[hidden]{display:none}.chat-dot{display:inline-block;width:10px;height:10px;background:#d5354e;border-radius:50%;margin-right:8px}.chat-count{color:#bd263d;font-size:12px}.chat-shell{max-width:1000px;margin:0 auto}.chat-thread-heading{display:flex;justify-content:space-between;align-items:center;gap:16px;margin-bottom:16px}.chat-thread-heading h1{font-size:24px;overflow-wrap:anywhere}.chat-thread-heading p{margin:5px 0 0;color:#708398;font-size:13px}.chat-customer-info{padding:15px 18px;border:1px solid #cbddeb;background:#edf7ff;border-radius:9px;margin-bottom:16px;overflow-wrap:anywhere}.chat-customer-info summary{cursor:pointer;font-size:16px;font-weight:600}.chat-tools{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}.chat-tools form{margin:0}.chat-tools details>form{padding:14px;background:white;border:1px solid #d8e4ee;border-radius:8px}.chat-stream{padding:20px;background:#e9f2fa;border:1px solid #cfdfed;border-radius:12px;max-height:65vh;min-height:260px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.chat-message{display:flex;flex-direction:column;align-items:flex-start;max-width:88%;margin:0 0 23px}.chat-own{margin-left:auto;align-items:flex-end}.chat-message-meta{display:flex;gap:12px;align-items:baseline;font-size:12px;color:#52718d;margin-bottom:5px;flex-wrap:wrap}.chat-message-meta strong{font-size:13px;color:#315b7e}.chat-bubble{padding:13px 17px;background:white;border:1px solid #d0dfec;border-radius:2px 13px 13px 13px;max-width:100%;box-shadow:0 2px 5px #244d7310;overflow-wrap:anywhere}.chat-own .chat-bubble{background:#d8ecff;border-color:#a9cdec;border-radius:13px 2px 13px 13px}.chat-bubble p{margin:0;white-space:normal;font-size:16px;line-height:1.7}.chat-bubble p+.button{margin-top:12px}.chat-image{display:block;margin:8px 0}.chat-image img{display:block;max-width:100%;width:auto;max-height:280px;object-fit:contain;border-radius:7px}.chat-file{display:block;padding:9px 0;font-size:14px;overflow-wrap:anywhere}.chat-file small{display:block;color:#6c8297}.chat-read{font-size:11px;color:#6c8297;margin-top:4px}.chat-system{max-width:100%;align-items:center;margin-left:auto;margin-right:auto}.chat-system .chat-bubble{background:#f4f9fd;border-style:dashed;text-align:center;font-size:14px}.chat-system .chat-bubble p{font-size:14px}.chat-delete{font-size:11px;margin-top:5px;color:#8a6470;max-width:100%}.chat-delete summary{cursor:pointer}.chat-delete form{background:white;padding:14px;border:1px solid #e5cad0;border-radius:8px}.chat-delete input{font-size:14px}.chat-delete .photo-keep{font-size:13px}.chat-compose{padding:20px;background:white;border:1px solid #d4e2ed;border-radius:12px;margin-top:12px;display:grid;gap:14px}.chat-compose textarea{font-size:17px;min-height:105px}.chat-compose .muted{font-size:12px;margin:0}.chat-attach-actions{display:flex;align-items:center;flex-wrap:wrap;gap:10px}.chat-attach-actions button{margin-left:auto;min-width:130px}.chat-new-files{display:flex;gap:12px;flex-wrap:wrap}.chat-new-file{border:1px solid #d1e1ed;background:#f7fbff;padding:10px;border-radius:8px;max-width:180px;font-size:12px;overflow-wrap:anywhere}.chat-new-file img{width:145px;height:100px;object-fit:contain;display:block;margin-bottom:6px}.chat-connection{font-size:12px;color:#768b9d;margin:8px 0}.chat-older{display:block;width:max-content;margin:0 auto 20px}.chat-list-row{display:flex;justify-content:space-between;gap:16px;padding:15px 18px;border-bottom:1px solid #e1eaf2;color:#254e71}.chat-list-row:hover{background:#f1f8fe}.chat-list-person{min-width:0;flex:1}.chat-list-person strong{display:block;overflow-wrap:anywhere;font-size:16px}.chat-list-person>span{display:block;white-space:nowrap;text-overflow:ellipsis;overflow:hidden;color:#71879c;font-size:14px;margin-top:5px}.chat-list-meta{display:grid;text-align:right;font-size:12px;gap:3px;flex-shrink:0}.chat-template-field{padding:18px;border:1px solid #d5e3ef;display:grid;gap:12px;border-radius:8px}.chat-template-field legend{padding:0 8px;font-weight:600}.chat-customer{background:#f2f7fc}.contact-header{background:white;border-bottom:1px solid #d4e4f1;padding:17px 24px;display:flex;align-items:center;justify-content:space-between;gap:16px;color:#3a668a}.contact-header img{display:block;width:210px;height:auto;max-height:35px;object-fit:contain}.contact-main{max-width:1040px;padding:24px;margin:0 auto}.contact-card{max-width:650px;margin:0 auto;padding:30px}.contact-card h1{font-size:25px;margin-bottom:18px}.contact-card>p{color:#627d95}.contact-card .stack{gap:20px}.contact-card input{font-size:17px}.contact-tabs{display:flex;gap:12px;margin:22px 0;flex-wrap:wrap}.contact-tabs>.button{flex:1}.contact-confirm{display:grid;grid-template-columns:120px minmax(0,1fr);gap:0;margin:24px 0}.contact-confirm dt,.contact-confirm dd{padding:13px 7px;border-bottom:1px solid #e0eaf2;margin:0;overflow-wrap:anywhere}.contact-confirm dt{color:#667f96;font-size:14px}.contact-footer{padding:25px;text-align:center;font-size:12px;color:#72879b}@media(max-width:760px){.chat-thread-heading{align-items:flex-start}.chat-thread-heading h1{font-size:20px}.chat-thread-heading .button{padding:9px 11px;min-height:46px;font-size:13px}.chat-stream{padding:14px 10px;max-height:60vh}.chat-message{max-width:94%;margin-bottom:20px}.chat-message-meta{gap:5px 10px;font-size:10px}.chat-message-meta strong{font-size:12px}.chat-bubble{padding:11px 13px}.chat-bubble p{font-size:17px}.chat-tools .button{font-size:14px;white-space:normal}.chat-compose{padding:15px 12px}.chat-attach-actions{display:grid;grid-template-columns:1fr 1fr}.chat-attach-actions .button{font-size:14px;min-height:52px;padding:11px 8px;white-space:normal}.chat-attach-actions button{grid-column:1/-1;width:100%;margin:0;font-size:18px}.chat-list-row{padding:12px 10px;gap:8px}.chat-list-person strong{font-size:14px}.chat-list-person>span{font-size:13px}.chat-list-meta{font-size:10px}.contact-header{padding:14px 16px}.contact-header img{width:165px;max-height:28px}.contact-header span{font-size:13px}.contact-main{padding:18px 12px}.contact-card{padding:24px 18px}.contact-card h1{font-size:23px}.contact-tabs{gap:8px}.contact-tabs .button{padding:12px 8px}.contact-confirm{grid-template-columns:95px minmax(0,1fr)}.chat-badge{min-width:25px;height:25px}.chat-image img{max-height:230px}}
.contact-entry-options{display:grid;gap:16px;margin:25px 0}.contact-entry-options>a{display:grid;grid-template-columns:minmax(0,1fr) 24px;gap:8px 16px;background:#edf7ff;border:1px solid #c9dfef;border-radius:12px;padding:23px;color:#245e8c}.contact-entry-options strong{font-size:23px;line-height:1.5}.contact-entry-options span{grid-column:1;font-size:15px;line-height:1.7;color:#658098}.contact-entry-options b{grid-column:2;grid-row:1/3;align-self:center;font-size:25px}.contact-entry-options>a:hover{background:#deeffe;border-color:#8abbe0}.chat-sales-note{padding:14px;background:#f2f7fb;border:1px solid #d8e4ee;border-radius:8px;font-size:13px;line-height:1.7}.chat-sales-note .photo-keep{font-size:14px}.chat-list-person>.chat-list-customer{font-size:13px;color:#416f95}.contact-landing{max-width:740px}@media(max-width:760px){.contact-entry-options>a{padding:21px 17px;min-height:125px}.contact-entry-options strong{font-size:22px}.contact-entry-options span{font-size:15px}.contact-entry-options{gap:16px}.chat-list-person>.chat-list-customer{font-size:12px}}

/* One compact composer on both sides; keep the conversation in view. */
.chat-thread-page.app .page-heading{display:none}.chat-thread-page.app .main{padding:16px 22px 24px}.chat-shell[data-chat-thread]{max-width:1200px;display:flex;flex-direction:column;gap:8px}.chat-thread-heading{margin-bottom:0;gap:10px}.chat-thread-heading h1{font-size:21px;line-height:1.4}.chat-thread-heading p{margin:3px 0 0}.chat-thread-heading .chat-popover{flex-shrink:0}.chat-staff-tools{display:flex;align-items:center;gap:6px;flex-wrap:nowrap}.chat-focus-toggle{margin-left:auto}.chat-icon{display:inline-flex;align-items:center;justify-content:center;width:44px;min-width:44px;height:44px;min-height:44px;flex-shrink:0;padding:0;border:1px solid #cee0ef;border-radius:10px;background:#eff7ff;color:#2169a4;cursor:pointer;line-height:1;position:relative;list-style:none;touch-action:manipulation}.chat-icon svg{display:block;pointer-events:none;width:23px;height:23px}.chat-icon:hover{background:#e0effd;border-color:#9ec6e8}.chat-icon:focus-visible,.chat-icon:focus-within{outline:3px solid #74b5e8;outline-offset:2px}.chat-icon::-webkit-details-marker{display:none}.chat-icon::marker{content:''}.chat-icon[hidden]{display:none}.chat-icon:disabled{opacity:.45;cursor:not-allowed}.chat-icon-send{background:#1768bf;color:white;border-color:#1768bf}.chat-icon-send:hover{background:#105ba9}.chat-icon.is-sending{opacity:.6}.chat-popover{position:relative}.chat-popover[open]>summary{background:#d8ecff;border-color:#82b4de}.chat-popover-panel{position:absolute;top:calc(100% + 7px);right:0;z-index:15;width:320px;max-width:calc(100vw - 30px);padding:18px;background:white;border:1px solid #c9ddec;border-radius:12px;box-shadow:0 10px 35px #203f632b;line-height:1.65;font-size:14px;overflow-wrap:anywhere}.chat-staff-tools .chat-popover-panel{right:auto;left:0}.chat-popover-panel form{margin:0}.chat-popover-panel .button{width:100%;white-space:normal;font-size:14px;min-height:44px}.chat-close-confirm{margin:12px 0}.chat-close-confirm>summary{cursor:pointer;list-style:none}.chat-close-confirm>form{padding:12px 0 0}.chat-help-text p{font-size:13px;color:#6e8295;margin:9px 0 13px}.chat-help-text strong{font-size:14px}.chat-stream{max-height:none;min-height:160px;height:calc(100dvh - 295px);padding:16px}.chat-message{margin-bottom:15px}.chat-bubble{padding:10px 14px}.chat-bubble p{line-height:1.6}.chat-connection{margin:0}.chat-connection[hidden]{display:none}.chat-compose.chat-compose-compact{display:block;margin-top:0;padding:8px;border-radius:12px}.chat-compose-row{display:flex;align-items:flex-end;gap:6px;flex-wrap:nowrap}.chat-compose-row>textarea{display:block;flex:1;min-width:0;width:0;min-height:44px;height:44px;max-height:160px;resize:none;padding:9px 10px;margin:0;line-height:24px;font-size:17px;box-sizing:border-box;overflow-y:hidden;border-radius:10px}.chat-compose-row>.chat-icon{width:44px;min-width:44px;height:44px;min-height:44px}.chat-compose-feedback{margin:7px 4px 2px;color:#5e7890;font-size:13px;line-height:1.5;overflow-wrap:anywhere}.chat-compose-feedback:empty{display:none}.chat-compose-compact .chat-new-files:empty{display:none}.chat-compose-compact .chat-new-files{gap:8px;margin-top:8px}.chat-compose-compact .chat-new-file{padding:7px;max-width:150px}.chat-compose-compact .chat-new-file img{width:120px;height:75px}.chat-voice-toggle.is-listening{background:#ffebee;border-color:#e48293;color:#c12644;box-shadow:0 0 0 2px #fce0e6}.chat-focus .sidebar,.chat-focus .topbar,.chat-focus .page-heading,.chat-focus footer{display:none!important}.chat-focus .workspace{margin:0!important}.chat-focus.app .main{padding:10px 16px}.chat-focus .chat-shell{max-width:none}.chat-thread-page .notice{margin:0}.chat-thread-page .contact-footer{padding:12px}.chat-thread-page .contact-main{padding-top:16px;padding-bottom:12px}@media(max-width:760px){.chat-thread-page.app .main{padding:12px}.chat-thread-heading h1{font-size:19px}.chat-thread-heading p{font-size:12px}.chat-compose-row{gap:4px}.chat-compose.chat-compose-compact{padding:7px}.chat-stream{padding:12px 9px}.chat-staff-tools{gap:6px}.chat-popover-panel{width:290px;max-width:calc(100vw - 32px)}.chat-staff-tools .chat-popover:nth-child(3) .chat-popover-panel{left:-100px}.chat-bubble p{font-size:17px}.chat-message{max-width:95%;margin-bottom:14px}.chat-message-meta{margin-bottom:3px}.chat-focus.app .main{padding:9px}.chat-thread-page .contact-main{padding:12px}.chat-thread-page .contact-header{padding:11px 15px}.chat-thread-page .contact-footer{display:none}.chat-compose-row>.chat-icon{min-height:44px;height:44px}.chat-compose-row>textarea{min-height:44px;font-size:17px}}@media(max-width:340px){.chat-compose-row{gap:3px}.chat-compose-row>.chat-icon{width:40px;min-width:40px}.chat-compose-row>textarea{padding-left:7px;padding-right:7px}}

@media(max-width:760px){.chat-staff-tools .chat-popover:nth-child(2) .chat-popover-panel{left:-50px}}

/* Keep emoji glyph fallback consistent for customer and employee timelines. */
.chat-bubble p,.chat-compose textarea{font-family:-apple-system,BlinkMacSystemFont,"Yu Gothic",Meiryo,"Apple Color Emoji","Segoe UI Emoji","Noto Color Emoji",sans-serif}

/* Mail preference switch: native checkbox works without JavaScript. */
.timeline-notification-field{min-width:0}.notification-switch{position:relative;display:inline-flex;align-items:center;gap:14px;align-self:flex-start;min-height:56px;min-width:214px;max-width:100%;padding:8px 12px;border:1px solid #c7dcec;border-radius:10px;background:#f5faff;cursor:pointer;user-select:none}.notification-switch-control{position:absolute!important;width:1px!important;height:1px!important;min-height:0!important;padding:0!important;opacity:0;overflow:hidden}.notification-switch-track{position:relative;display:block;flex:0 0 64px;width:64px;height:36px;border:2px solid #8399ac;border-radius:20px;background:#8399ac;transition:background .15s,border-color .15s}.notification-switch-track:after{content:'';position:absolute;left:2px;top:2px;width:28px;height:28px;border-radius:50%;background:#fff;box-shadow:0 1px 3px #153b5a30;transition:transform .15s}.notification-switch-control:checked+.notification-switch-track{background:#1768bf;border-color:#1768bf}.notification-switch-control:checked+.notification-switch-track:after{transform:translateX(28px)}.notification-switch-control:focus-visible+.notification-switch-track{outline:3px solid #55a5e6;outline-offset:4px}.notification-switch-state{font-size:17px;line-height:1.5;font-weight:650;color:#425e78}.notification-on{display:none}.notification-switch-control:checked~.notification-switch-state .notification-on{display:inline;color:#135da8}.notification-switch-control:checked~.notification-switch-state .notification-off{display:none}@media(prefers-reduced-motion:reduce){.notification-switch-track,.notification-switch-track:after{transition:none}}

/* One presentation for automatic notices in all employee/customer timelines. */
.chat-stream .chat-message.chat-system{width:fit-content;max-width:min(100%,760px);align-items:center;align-self:center;margin-left:auto;margin-right:auto;text-align:center}
.chat-stream .chat-message.chat-system>.chat-message-meta{justify-content:center;text-align:center;align-self:center}
.chat-stream .chat-message.chat-system>.chat-bubble{border:1px solid #bed3e7;border-radius:14px;background:#e0edf8;color:#244e70;box-shadow:none;text-align:center;font-size:16px;line-height:1.65;padding:10px 14px}
.chat-stream .chat-message.chat-system>.chat-bubble p{font-size:16px;text-align:center}
.chat-system .chat-read,.chat-system .chat-delete{align-self:center;text-align:center}.chat-system .chat-image{margin-left:auto;margin-right:auto}
.chat-thread-page .notice,.chat-shell>.notice{border-radius:14px;background:#e0edf8;text-align:center;border-color:#bed3e7}
.chat-text-link{color:#075eac;text-decoration:underline;text-underline-offset:2px;overflow-wrap:anywhere}.chat-text-link:focus-visible{outline:3px solid #6aafe8;outline-offset:3px}
