/* Shared messenger for the customer account and the administration workspace. */
.messages-main { padding-top:34px; padding-bottom:36px; }
.messages-page-title { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:25px; }
.messages-page-title .eyebrow { font-size:10px; }
.messages-page-title h1 { margin-top:8px; font:700 32px/1.2 'Inter',sans-serif; letter-spacing:-.04em; }
.messages-profile-link { color:var(--text-mute); font-size:12px; }
.ember-messenger { --em-line:var(--border); display:grid; grid-template-columns:300px minmax(0,1fr); height:clamp(570px,calc(100dvh - 235px),900px); min-width:0; overflow:hidden; border:1px solid var(--border-strong); border-radius:19px; background:var(--bg-2); color:var(--text); font-family:'Inter',sans-serif; }
.ember-messenger *, .em-access-dialog * { box-sizing:border-box; }
.ember-messenger button { font:inherit; cursor:pointer; }
.ember-messenger button:disabled { opacity:.5; cursor:default; }
.ember-messenger :is(button,a,input,textarea):focus-visible,.em-access-dialog :is(button,input,textarea):focus-visible { outline:2px solid var(--flame-2); outline-offset:3px; }
.em-sidebar { display:flex; flex-direction:column; min-width:0; min-height:0; border-right:1px solid var(--em-line); background:rgba(255,255,255,.015); }
.em-inbox-head { display:flex; align-items:center; gap:10px; padding:23px 21px 17px; }
.em-inbox-head h2 { flex:1; margin:0; font-size:18px; font-weight:650; letter-spacing:-.03em; }
.em-icon-button { display:inline-grid; place-items:center; flex:none; width:33px; height:33px; padding:0; border:1px solid var(--border); border-radius:9px; background:transparent; color:var(--text-mute); }
.em-icon-button:hover { color:var(--text); border-color:var(--border-strong); background:var(--surface); }
.ember-messenger .em-search { display:flex; flex:none; align-items:center; gap:9px; min-height:42px; margin:0 16px; padding:0 12px; border:1px solid var(--border); border-radius:10px; color:var(--text-mute); background:var(--surface); transition:border-color .2s,box-shadow .2s; }
.ember-messenger .em-search:focus-within { border-color:var(--accent-line); box-shadow:0 0 0 3px rgba(255,90,31,.055); }
.ember-messenger .em-search > svg { flex:none; width:15px; height:15px; }
.ember-messenger .em-search input { appearance:none; -webkit-appearance:none; flex:1; width:100%; min-width:0; height:40px; margin:0; padding:0; border:0; border-radius:0; outline:none; box-shadow:none; background:transparent; color:var(--text); font:12px/1.5 'Inter',sans-serif; }
.ember-messenger .em-search input:focus-visible { outline:none; }
.em-search input::placeholder { color:var(--text-dim); opacity:1; }
.em-search-clear { display:grid; place-items:center; flex:none; width:24px; height:24px; padding:0; border:0; border-radius:6px; background:transparent; color:var(--text-mute); }
.em-search-clear:hover { color:var(--text); background:var(--surface-2); }
.em-filters { display:flex; gap:5px; margin:13px 16px 15px; }
.em-filters button { flex:1; padding:7px 3px; border:1px solid transparent; border-radius:7px; color:var(--text-mute); background:none; font-size:10px; }
.em-filters button[aria-pressed=true] { border-color:var(--border); background:var(--surface-2); color:var(--text); }
.em-inbox-list { flex:1; min-height:0; padding:0 8px 12px; overflow-y:auto; overscroll-behavior:contain; }
.em-pinned-list { flex:none; margin:0 8px 9px; padding-bottom:9px; border-bottom:1px solid var(--em-line); }
.em-pinned-list .em-chat-row { margin-bottom:0; background:rgba(255,90,31,.035); border-color:rgba(255,90,31,.1); }
.em-pinned-list .em-pin { color:var(--flame-3); font-size:8px; letter-spacing:.035em; }
.em-chat-row { display:flex; width:100%; align-items:flex-start; gap:11px; margin-bottom:5px; padding:15px 11px; border:1px solid transparent; border-radius:11px; color:var(--text); background:none; text-align:left; transition:background .2s,border-color .2s; }
.em-chat-row:hover { background:var(--surface); }
.em-chat-row[aria-current=true] { border-color:rgba(255,90,31,.22); background:rgba(255,90,31,.07); }
.em-chat-avatar { display:grid; place-items:center; flex:none; width:36px; height:36px; border:1px solid var(--border); border-radius:11px; background:var(--surface); color:#b7aaa4; }
.em-chat-avatar { position:relative; }
.em-presence-dot { position:absolute; right:-2px; bottom:-2px; width:9px; height:9px; border:2px solid var(--bg-2); border-radius:50%; background:var(--text-dim); }
.em-presence-dot.is-online { background:#75c79b; }
.em-connection-status { display:flex; align-items:center; gap:6px; margin:-7px 21px 15px; color:var(--text-dim); font-size:9px; line-height:1.5; }
.em-connection-status::before { content:''; flex:none; width:4px; height:4px; border-radius:50%; background:var(--text-dim); }
.em-connection-status.is-live::before { background:#75c79b; }
.em-peer-status { display:flex; align-items:center; gap:6px; margin:7px 0 0; color:var(--text-mute); font-size:10px; line-height:1.5; }
.em-peer-status i { width:5px; height:5px; flex:none; border-radius:50%; background:var(--text-dim); }
.em-peer-status.is-online { color:#9bc9b0; }
.em-peer-status.is-online i { background:#75c79b; }
.em-chat-row.is-pinned .em-chat-avatar { color:var(--flame-3); background:var(--grad-fire-soft); border-color:rgba(255,90,31,.17); }
.em-chat-copy { display:grid; flex:1; min-width:0; gap:5px; }
.em-chat-copy strong { color:var(--text); font-size:12px; font-weight:600; line-height:1.5; }
.em-chat-copy small { color:var(--text-mute); font-size:10px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.em-chat-copy .em-preview { color:var(--text-dim); line-height:1.5; }
.em-chat-copy .em-deletion-label { color:var(--flame-3); line-height:1.5; }
.em-chat-meta { display:grid; justify-items:end; gap:9px; padding-top:2px; flex:none; }
.em-chat-meta time,.em-pin { color:var(--text-dim); font-size:9px; }
.em-unread { display:grid; place-items:center; min-width:18px; height:18px; padding:0 4px; border-radius:6px; color:#fff; background:var(--accent); font-size:9px; }
.em-empty-list { padding:28px 12px; text-align:center; color:var(--text-mute); font-size:12px; line-height:1.7; }
.em-thread { display:flex; flex-direction:column; min-width:0; min-height:0; background:linear-gradient(160deg,rgba(255,90,31,.018),transparent 45%); }
.em-thread .em-messages { transition:opacity .16s; }
.em-thread.is-loading .em-messages { opacity:.45; }
.em-welcome { display:flex; flex:1; flex-direction:column; align-items:center; justify-content:center; padding:34px; text-align:center; }
.em-welcome-icon { display:grid; place-items:center; width:62px; height:62px; margin-bottom:23px; border:1px solid var(--border-strong); border-radius:18px; color:var(--flame-3); background:var(--grad-fire-soft); }
.em-welcome h2 { margin:0 0 12px; max-width:320px; font-size:23px; font-weight:600; line-height:1.35; letter-spacing:-.035em; }
.em-welcome p { max-width:310px; margin:0; color:var(--text-mute); font-size:12px; line-height:1.9; }
.em-conversation { display:flex; flex:1; flex-direction:column; min-height:0; }
.em-thread-head { display:flex; align-items:center; gap:12px; padding:19px 23px; border-bottom:1px solid var(--em-line); }
.em-thread-head-copy { flex:1; min-width:0; }
.em-thread-head-copy small { color:var(--flame-3); font-size:9px; letter-spacing:.07em; }
.em-thread-head h2 { margin:5px 0 0; font-size:16px; line-height:1.45; font-weight:600; overflow-wrap:anywhere; }
.em-back { display:none; }
.em-order-link { flex:none; color:var(--text-mute); font-size:10px; text-decoration:none; }
.em-order-link:hover { color:var(--flame-3); }
.em-delete-button:hover { color:var(--flame-3); }
.em-deletion-notice { display:flex; flex:none; align-items:center; gap:16px; padding:15px 23px; border-bottom:1px solid var(--border); background:rgba(255,90,31,.045); }
.em-deletion-notice > div { flex:1; min-width:0; }
.em-deletion-notice strong { display:block; color:var(--text); font-size:11px; font-weight:600; }
.em-deletion-notice p { margin:5px 0; color:var(--text-mute); font-size:10px; line-height:1.7; }
.em-deletion-notice small { color:var(--text-dim); font-size:9px; }
.em-deletion-notice button { flex:none; padding:8px 10px; border:1px solid var(--accent-line); border-radius:8px; background:transparent; color:var(--flame-3); font-size:10px; }
.em-deletion-notice button:hover { background:var(--surface); }
.em-delete-dialog { width:min(440px,calc(100% - 32px)); max-height:calc(100dvh - 32px); padding:0; margin:auto; overflow-y:auto; border:1px solid var(--border-strong); border-radius:18px; color:var(--text); background:var(--bg-elev); box-shadow:var(--shadow-pop); font-family:'Inter',sans-serif; }
.em-delete-dialog::backdrop { background:rgba(0,0,0,.65); backdrop-filter:blur(8px); }
.em-delete-dialog[open] { animation:emPanelIn .22s cubic-bezier(.22,.61,.36,1) both; }
.em-delete-panel { margin:0; padding:28px; }
.em-delete-icon { display:grid; place-items:center; width:42px; height:42px; margin-bottom:20px; border:1px solid var(--accent-line); border-radius:12px; color:var(--flame-3); background:var(--grad-fire-soft); }
.em-delete-panel h2 { margin:0 0 13px; font-size:21px; line-height:1.35; letter-spacing:-.03em; }
.em-delete-panel > p { margin:0 0 13px; color:var(--text-mute); font-size:12px; line-height:1.8; }
.em-delete-panel > small { display:block; color:var(--text-dim); font-size:10px; line-height:1.8; }
.em-delete-actions { display:flex; justify-content:flex-end; flex-wrap:wrap; gap:9px; margin-top:25px; }
.em-delete-actions .btn { padding:11px 13px; font-size:11px; }
.em-delete-dialog :is(button):focus-visible { outline:2px solid var(--flame-2); outline-offset:3px; }
html:has(.em-delete-dialog[open]) { overflow:hidden; }
.em-order-context { display:flex; flex-wrap:wrap; align-items:center; gap:9px 16px; padding:12px 23px; border-bottom:1px solid var(--em-line); background:var(--surface); color:var(--text-mute); font-size:10px; line-height:1.7; }
.em-order-state { display:inline-flex; align-items:center; gap:6px; color:#c4b7ae; }
.em-order-state::before { content:''; width:5px; height:5px; border-radius:2px; background:var(--flame-2); }
.em-access-toolbar { display:flex; align-items:center; gap:12px; flex-wrap:wrap; padding:11px 23px; border-bottom:1px solid var(--em-line); }
.em-access-button { display:inline-flex; gap:8px; align-items:center; padding:8px 10px; border:1px solid var(--border-strong); border-radius:8px; background:var(--surface); color:var(--text); font-size:10px !important; }
.em-access-note { color:var(--text-dim); font-size:10px; }
.em-request-data { margin-left:auto; padding:6px 0; border:0; background:none; color:#d6a17f; font-size:10px !important; }
.em-messages { flex:1; min-height:0; padding:20px 24px; overflow-y:auto; overscroll-behavior:contain; }
.em-day { display:flex; align-items:center; gap:12px; margin:12px 0 20px; color:var(--text-dim); text-align:center; font-size:9px; }
.em-day::before,.em-day::after { content:''; flex:1; height:1px; background:var(--border); }
.em-bubble { width:fit-content; max-width:85%; margin:9px 0; padding:11px 14px 9px; border:1px solid var(--border); border-radius:3px 13px 13px 13px; background:var(--surface); }
.em-bubble.is-mine { margin-left:auto; border-color:rgba(255,90,31,.13); border-radius:13px 3px 13px 13px; background:rgba(255,90,31,.09); }
.em-bubble > small { display:block; color:#bba398; font-size:9px; }
.em-bubble p { margin:5px 0; color:var(--text); white-space:pre-wrap; overflow-wrap:anywhere; font-size:12px; line-height:1.75; }
.em-bubble time { display:block; color:var(--text-dim); font-size:9px; text-align:right; }
.em-system-note { display:flex; align-items:center; justify-content:center; gap:8px; margin:18px auto; color:var(--text-mute); font-size:10px; line-height:1.7; text-align:center; }
.em-system-note svg { flex:none; color:#c49c7c; }
.em-thread-empty { display:grid; align-content:center; height:100%; min-height:150px; max-width:320px; margin:auto; text-align:center; color:var(--text-mute); font-size:12px; line-height:1.9; }
.em-compose { flex:none; margin:0; padding:15px 20px 12px; border-top:1px solid var(--em-line); background:var(--bg-2); }
.em-compose-row { display:flex; align-items:flex-end; gap:10px; padding:9px 9px 9px 13px; border:1px solid var(--border-strong); border-radius:12px; background:var(--surface); }
.em-compose-row:focus-within { border-color:var(--accent-line); }
.em-compose textarea { display:block; width:100%; min-width:0; max-height:135px; min-height:33px; padding:8px 0 3px; resize:none; border:0; outline:none !important; background:none; color:var(--text); font:12px/1.6 'Inter',sans-serif; }
.em-send { display:grid; place-items:center; flex:none; width:34px; height:34px; padding:0; border:1px solid rgba(255,170,100,.22); border-radius:9px; color:white; background:var(--grad-fire); }
.em-send:disabled { background:var(--surface-2); color:var(--text-dim); border-color:var(--border); }
.em-compose-hint { display:flex; justify-content:space-between; gap:12px; margin-top:8px; color:var(--text-dim); font-size:9px; }
.em-status { margin-top:7px; color:#e8aa8a; font-size:11px; line-height:1.6; }
.em-status:empty { display:none; }
.em-loading,.em-auth { grid-column:1/-1; display:grid; place-content:center; justify-items:center; gap:18px; padding:30px; text-align:center; color:var(--text-mute); font-size:13px; }
.em-access-dialog { width:min(490px,calc(100% - 28px)); max-height:calc(100dvh - 28px); padding:0; margin:auto; overflow-y:auto; border:1px solid var(--border-strong); border-radius:18px; color:var(--text); background:var(--bg-elev); box-shadow:var(--shadow-pop); font-family:'Inter',sans-serif; }
.em-access-dialog::backdrop { background:rgba(0,0,0,.75); backdrop-filter:blur(8px); }
.em-access-panel { position:relative; display:grid; gap:20px; padding:29px; }
.em-access-close { position:absolute; right:17px; top:17px; }
.em-access-panel h2 { margin:0; padding-right:35px; font-size:22px; line-height:1.35; letter-spacing:-.03em; }
.em-access-description { margin:0; color:var(--text-mute); font-size:11px; line-height:1.8; }
.em-access-panel label { display:grid; gap:8px; color:var(--text-mute); font-size:11px; }
.em-access-panel .input { width:100%; min-width:0; font-size:13px; }
.em-access-panel textarea { resize:vertical; }
.em-password-row { display:flex; gap:8px; }
.em-password-row .input { flex:1; }
.em-password-toggle { padding:0 12px; border:1px solid var(--border); border-radius:10px; color:var(--text-mute); background:var(--surface); font:11px 'Inter',sans-serif; cursor:pointer; }
.em-access-actions { display:grid; gap:10px; }
.em-access-delete { padding:8px; border:0; background:none; color:#c79886; font:11px 'Inter',sans-serif; cursor:pointer; }
html:has(.em-access-dialog[open]) { overflow:hidden; }
#page-chats .ember-messenger { height:calc(100dvh - 150px); min-height:540px; }
@media(max-width:1000px) { .ember-messenger { grid-template-columns:265px minmax(0,1fr); } }
@media(max-width:700px) {
  .ember-messenger .em-search input { font-size:16px; }
  .em-deletion-notice { align-items:flex-start; flex-direction:column; gap:10px; padding:14px 16px; }
  .em-delete-panel { padding:24px 20px; }
  .messages-main { padding-top:24px; padding-bottom:22px; }
  .messages-page-title { margin-bottom:20px; }
  .messages-page-title h1 { font-size:28px; }
  .messages-page-title .eyebrow { font-size:8px; }
  .messages-profile-link { font-size:10px; }
  .ember-messenger { grid-template-columns:minmax(0,1fr); height:calc(100dvh - 208px); min-height:470px; border-radius:15px; }
  .em-sidebar { border-right:0; }
  .em-thread { display:none; }
  .ember-messenger.is-conversation .em-sidebar { display:none; }
  .ember-messenger.is-conversation .em-thread { display:flex; }
  .em-sidebar { animation:emInboxIn .22s ease-out; }
  .ember-messenger.is-conversation .em-thread { animation:emThreadIn .22s ease-out; }
  .em-back { display:inline-grid; }
  .em-thread-head { gap:9px; padding:15px 13px; }
  .em-thread-head h2 { font-size:13px; }
  .em-thread-head-copy small { font-size:8px; }
  .em-order-link { font-size:9px; max-width:56px; }
  .em-order-context { padding:10px 16px; font-size:9px; gap:4px 12px; }
  .em-access-toolbar { padding:10px 15px; gap:9px; }
  .em-access-note { font-size:9px; }
  .em-access-button + .em-access-note { display:none; }
  .em-messages { padding:12px 14px; }
  .em-bubble { max-width:92%; }
  .em-compose { padding:12px; }
  .em-compose-hint > span:last-child { display:none; }
  .em-inbox-head { padding:20px 21px 16px; }
  #page-chats .ember-messenger { height:calc(100dvh - 175px); min-height:470px; }
  .em-access-panel { padding:25px 20px; }
}
@media(prefers-reduced-motion:reduce) { .em-chat-row { transition:none; } }

/* Desktop messages stay above the current page without changing its URL. */
.em-panel-dialog { width:min(1120px,calc(100vw - 64px)); height:min(800px,calc(100dvh - 64px)); max-width:none; max-height:none; margin:auto; padding:0; overflow:hidden; border:1px solid var(--border-strong); border-radius:20px; color:var(--text); background:var(--bg-2); box-shadow:var(--shadow-pop); font-family:'Inter',sans-serif; }
.em-panel-dialog[open] { display:flex; flex-direction:column; animation:emPanelIn .3s cubic-bezier(.22,.61,.36,1) both; }
.em-panel-dialog.is-closing { animation:none; }
.em-panel-dialog::backdrop { background:rgba(4,3,5,.65); backdrop-filter:blur(8px); animation:emBackdropIn .28s ease both; }
.em-panel-dialog.is-closing::backdrop { animation:emBackdropOut .18s ease both; }
.em-panel-header { display:flex; flex:none; align-items:center; justify-content:space-between; gap:20px; padding:20px 24px; border-bottom:1px solid var(--border); background:var(--bg-elev); }
.em-panel-header h2 { margin:0; font:650 18px/1.3 'Inter',sans-serif; letter-spacing:-.025em; }
.em-panel-header p { margin:5px 0 0; color:var(--text-mute); font-size:11px; }
.em-panel-actions { display:flex; align-items:center; gap:9px; }
.em-panel-expand { display:grid; place-items:center; width:33px; height:33px; border:1px solid transparent; border-radius:9px; color:var(--text-mute); text-decoration:none; transition:color .2s,background .2s; }
.em-panel-expand:hover { color:var(--text); background:var(--surface); }
.em-panel-dialog .ember-messenger { flex:1; width:100%; height:auto; min-height:0; border:0; border-radius:0; }
.em-panel-dialog :is(a,button):focus-visible { outline:2px solid var(--flame-2); outline-offset:3px; }
html:has(.em-panel-dialog[open]) { overflow:hidden; scrollbar-gutter:stable; }
@keyframes emPanelIn { from { opacity:0; transform:translateY(18px) scale(.985); } to { opacity:1; transform:translateY(0) scale(1); } }
@keyframes emBackdropIn { from { opacity:0; } to { opacity:1; } }
@keyframes emBackdropOut { to { opacity:0; } }
@keyframes emInboxIn { from { opacity:.4; transform:translateX(-7px); } to { opacity:1; transform:translateX(0); } }
@keyframes emThreadIn { from { opacity:.4; transform:translateX(7px); } to { opacity:1; transform:translateX(0); } }
@media(max-width:900px) { .em-panel-dialog { width:100%; height:100dvh; margin:0; border:0; border-radius:0; } }
@media(prefers-reduced-motion:reduce) {
  .em-delete-dialog[open] { animation:none; }
  .em-panel-dialog[open],.em-panel-dialog::backdrop,.em-panel-dialog.is-closing::backdrop { animation:none; }
  .em-thread .em-messages,.em-panel-expand { transition:none; }
  .em-sidebar,.ember-messenger.is-conversation .em-thread { animation:none; }
}

/* Final messenger pass: the inbox, conversation and composer share one clear
   surface hierarchy while keeping the Ember accent for actions and unread state. */
body.messages-page {
  background: var(--grad-bg) !important;
  background-color: var(--bg) !important;
  color: var(--text);
}
body.messages-page::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(58% 36% at 50% 0%, rgba(255,92,31,.09), transparent 72%),
    radial-gradient(40% 30% at 88% 8%, rgba(255,174,61,.045), transparent 72%);
}
.messages-main { position:relative; z-index:1; width:min(calc(100% - 56px),var(--container)); min-width:0; margin-inline:auto; padding-top:clamp(36px,5vw,64px); }
.messages-page-title,.messages-page-title > div { min-width:0; }
.messages-page-title { width:100%; }
.messages-main > .ember-messenger { width:100%; max-width:100%; }
.em-auth { min-width:0; width:100%; }
.em-auth h2,.em-auth p { min-width:0; width:min(100%,360px); margin-inline:auto; text-align:center; overflow-wrap:anywhere; white-space:normal; }
.messages-page-title h1 { font-size:clamp(32px,4vw,48px); letter-spacing:-.055em; }
.messages-page-title { margin-bottom:28px; }
.messages-profile-link { border-color:var(--border-strong); background:var(--surface); }
.messages-profile-link:hover { border-color:var(--accent-line); background:var(--accent-soft); }
.ember-messenger {
  border-color:rgba(255,255,255,.14);
  border-radius:22px;
  background:rgba(16,16,17,.88);
  box-shadow:0 26px 70px -34px rgba(0,0,0,.9), inset 0 1px 0 rgba(255,255,255,.035);
  isolation:isolate;
}
.em-sidebar {
  border-right-color:rgba(255,255,255,.1);
  background:linear-gradient(180deg,rgba(255,255,255,.035),rgba(255,255,255,.012));
}
.em-inbox-head { padding:21px 20px 16px; }
.em-inbox-head h2 { font-size:17px; }
.em-icon-button { transition:color .2s,background .2s,border-color .2s,transform .2s; }
.em-icon-button:hover { transform:translateY(-1px); }
.em-filters { margin-top:12px; }
.em-filters button { min-height:30px; border-radius:9px; transition:color .2s,background .2s,border-color .2s; }
.em-filters button[aria-pressed=true] { border-color:var(--accent-line); color:var(--flame-3); background:var(--accent-soft); }
.em-inbox-list { padding:0 9px 14px; }
.em-chat-row { position:relative; min-height:72px; margin-bottom:4px; padding:13px 11px; border-radius:13px; }
.em-chat-row::before { content:''; position:absolute; left:0; top:14px; bottom:14px; width:3px; border-radius:0 3px 3px 0; background:transparent; transition:background .2s; }
.em-chat-row:hover { border-color:rgba(255,255,255,.07); background:rgba(255,255,255,.045); }
.em-chat-row[aria-current=true] { border-color:rgba(255,90,31,.25); background:linear-gradient(100deg,rgba(255,90,31,.11),rgba(255,255,255,.035)); box-shadow:inset 0 1px 0 rgba(255,255,255,.025); }
.em-chat-row[aria-current=true]::before { background:var(--accent); }
.em-chat-row[aria-current=true] .em-chat-copy strong { color:#fff5ef; }
.em-chat-avatar { width:39px; height:39px; border-radius:12px; background:linear-gradient(145deg,rgba(255,255,255,.07),rgba(255,255,255,.025)); }
.em-chat-row.is-pinned .em-chat-avatar { background:linear-gradient(145deg,rgba(255,90,31,.18),rgba(255,174,61,.06)); }
.em-unread { min-width:20px; height:20px; border-radius:7px; box-shadow:0 0 0 3px rgba(255,90,31,.08); }
.em-thread { background:radial-gradient(ellipse 80% 48% at 100% 0,rgba(255,90,31,.055),transparent 68%),#111112; }
.em-thread-head { padding:18px 23px; background:rgba(22,22,24,.68); backdrop-filter:blur(12px); }
.em-thread-head h2 { font-size:17px; }
.em-messages { padding:24px clamp(18px,3vw,34px); background:linear-gradient(180deg,rgba(255,255,255,.012),transparent 28%); }
.em-day { margin:14px 0 22px; text-transform:uppercase; letter-spacing:.08em; }
.em-bubble { max-width:min(680px,85%); margin:10px 0; padding:12px 15px 10px; border-color:rgba(255,255,255,.1); border-radius:5px 16px 16px 16px; background:rgba(255,255,255,.045); box-shadow:0 8px 24px -18px rgba(0,0,0,.9); }
.em-bubble.is-mine { border-color:rgba(255,90,31,.22); border-radius:16px 5px 16px 16px; background:linear-gradient(135deg,rgba(255,90,31,.18),rgba(255,122,43,.075)); }
.em-bubble > small { color:var(--flame-3); font-weight:600; }
.em-bubble p { font-size:13px; line-height:1.65; }
.em-compose { padding:16px 20px max(12px,env(safe-area-inset-bottom)); background:linear-gradient(180deg,rgba(16,16,17,.72),rgba(16,16,17,.98)); }
.em-compose-row { padding:8px 8px 8px 14px; border-radius:14px; background:rgba(255,255,255,.045); box-shadow:inset 0 1px 0 rgba(255,255,255,.025); }
.em-compose-row:focus-within { border-color:var(--accent-line); box-shadow:0 0 0 3px rgba(255,90,31,.08); }
.em-send { width:37px; height:37px; border-radius:11px; transition:transform .2s,filter .2s,background .2s; }
.em-send:hover:not(:disabled) { transform:translateY(-1px); filter:brightness(1.08); }
.em-compose-hint { padding:0 2px; }
.em-panel-dialog { border-color:rgba(255,255,255,.16); border-radius:22px; }
.em-panel-header { padding:19px 23px; background:rgba(22,22,24,.9); }
.em-panel-body { min-height:0; }
@media(max-width:700px) {
  .messages-main { width:calc(100% - 32px); padding:27px 0 22px; }
  .messages-page-title { align-items:flex-end; margin-bottom:18px; }
  .messages-page-title h1 { font-size:30px; }
  .messages-profile-link { width:38px; min-width:38px; height:38px; padding:9px; overflow:hidden; font-size:0; }
  .messages-profile-link > span { font-size:14px; }
  .ember-messenger { width:calc(100vw - 32px) !important; max-width:calc(100vw - 32px) !important; min-width:0; border-radius:17px; }
  .em-inbox-list { padding-left:7px; padding-right:7px; }
  .em-chat-row { min-height:68px; }
  .em-thread-head { background:rgba(22,22,24,.94); }
  .em-auth h2 { width:min(100%,280px); font-size:18px; }
  .em-auth p { width:min(100%,280px); }
  .em-messages { padding:16px 13px; }
  .em-compose { padding:10px 10px max(10px,env(safe-area-inset-bottom)); }
}
