.coalition-message-floater [hidden]{display:none!important}
.coalition-message-floater{position:fixed;right:24px;bottom:22px;z-index:9999;font-family:Inter,system-ui,sans-serif}
.mf-launcher{min-width:158px;height:48px;border:1px solid rgba(218,197,141,.35);border-radius:16px;background:linear-gradient(180deg,rgba(8,15,18,.96),rgba(2,5,7,.98));color:#f3ead1;display:inline-flex;align-items:center;justify-content:center;gap:10px;box-shadow:0 18px 60px rgba(0,0,0,.55),0 0 18px rgba(218,197,141,.10);cursor:pointer;text-transform:uppercase;letter-spacing:.08em;font-size:12px}
.mf-launcher:hover{border-color:rgba(218,197,141,.72);box-shadow:0 18px 70px rgba(0,0,0,.65),0 0 28px rgba(91,141,255,.20)}
.mf-launcher-icon{color:#d8bd72}.mf-launcher-badge{display:none;min-width:20px;height:20px;padding:0 6px;border-radius:999px;background:#366cff;color:#fff;align-items:center;justify-content:center;font-size:11px;font-weight:800;box-shadow:0 0 18px rgba(75,130,255,.55)}.mf-launcher-badge.is-visible{display:inline-flex}
.mf-panel{position:absolute;right:0;bottom:58px;width:min(632px,calc(100vw - 48px));height:min(620px,calc(100vh - 130px));min-height:506px;border:1px solid rgba(218,197,141,.25);border-radius:18px 18px 6px 18px;overflow:hidden;background:linear-gradient(180deg,rgba(5,9,13,.98),rgba(0,0,0,.98));box-shadow:0 28px 100px rgba(0,0,0,.74),0 0 0 1px rgba(92,127,255,.12)}
.mf-topbar{height:66px;display:flex;align-items:center;justify-content:space-between;padding:0 14px 0 18px;border-bottom:1px solid rgba(218,197,141,.14);background:rgba(8,12,16,.95)}
.mf-kicker{margin:0 0 3px;color:#8d9bab;font-size:10px;text-transform:uppercase;letter-spacing:.18em}.mf-topbar h2{margin:0;color:#f5ead0;font-family:Cinzel,Georgia,serif;font-size:21px;letter-spacing:.08em}.mf-actions{display:flex;gap:7px}.mf-icon-button{width:34px;height:34px;border:1px solid rgba(218,197,141,.20);border-radius:999px;background:rgba(255,255,255,.035);color:#d9d2c2;display:grid;place-items:center;text-decoration:none;cursor:pointer}.mf-icon-button:hover{border-color:rgba(218,197,141,.5);color:#fff}.mf-close-button:hover{border-color:rgba(255,90,90,.65);color:#ffbaba}.coalition-message-floater.is-minimized .mf-launcher{border-color:rgba(218,197,141,.55)}.coalition-message-floater.is-hard-closed .mf-launcher{opacity:.88}
.mf-body{height:calc(100% - 66px);display:grid;grid-template-columns:255px minmax(0,1fr)}
.mf-thread-list{border-right:1px solid rgba(218,197,141,.12);background:rgba(0,0,0,.45);overflow:hidden;display:flex;flex-direction:column}
.mf-thread-list-head{height:48px;border-bottom:1px solid rgba(218,197,141,.10);display:flex;align-items:center;gap:8px;padding:0 14px;color:#d8d2c7;text-transform:uppercase;letter-spacing:.12em;font-size:12px}.mf-back-button{border:0;background:none;color:#d8d2c7;font-size:24px}
.mf-thread-items{overflow:auto;min-height:0}.mf-loading,.mf-error,.mf-no-threads{padding:18px;color:#918a7d;font-size:13px}
.mf-thread{width:100%;border:0;border-bottom:1px solid rgba(218,197,141,.08);background:transparent;color:#d8d2c7;padding:12px;display:grid;grid-template-columns:42px minmax(0,1fr) auto;gap:10px;text-align:left;cursor:pointer}
.mf-thread:hover,.mf-thread.is-active{background:linear-gradient(90deg,rgba(92,127,255,.14),rgba(218,197,141,.05))}
.mf-avatar{width:42px;height:42px;border-radius:999px;border:1px solid rgba(218,197,141,.28);background:radial-gradient(circle at 40% 35%,rgba(218,197,141,.22),rgba(4,7,9,.95));color:#e7d08c;display:grid;place-items:center;font-family:Cinzel,serif;font-weight:700;overflow:hidden;flex:0 0 auto}
.mf-avatar img{width:100%;height:100%;object-fit:cover;display:block}.mf-thread-name{font-weight:800;color:#e8e0d1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-size:13px}.mf-thread-preview{margin-top:3px;color:#8f98a2;font-size:12px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mf-thread-time{color:#8d867a;font-size:11px;white-space:nowrap}.mf-thread-unread{display:inline-grid;place-items:center;min-width:18px;height:18px;border-radius:999px;background:#366cff;color:#fff;font-size:10px;font-weight:800;margin-top:6px}
.mf-chat-view{position:relative;min-width:0;background:radial-gradient(circle at 50% 0,rgba(35,65,120,.16),transparent 45%),rgba(3,6,8,.86)}
.mf-empty{height:100%;display:grid;place-items:center;align-content:center;text-align:center;padding:24px;color:#938d81}.mf-empty-orb{width:78px;height:78px;border:1px solid rgba(218,197,141,.32);border-radius:999px;display:grid;place-items:center;margin-bottom:16px;color:#d8bd72;font-size:32px;box-shadow:0 0 35px rgba(218,197,141,.10)}.mf-empty h3{margin:0 0 8px;color:#f2e5c5;font-family:Cinzel,serif}.mf-primary-link{margin-top:12px;color:#d8bd72;text-decoration:none;text-transform:uppercase;font-size:12px;letter-spacing:.12em}
.mf-conversation{height:100%;display:grid;grid-template-rows:68px minmax(0,1fr) auto}.mf-conversation-head{display:flex;align-items:center;gap:12px;padding:12px 14px;border-bottom:1px solid rgba(218,197,141,.11);background:rgba(0,0,0,.28)}.mf-conversation-head h3{margin:0;color:#f3ead1;font-size:15px}.mf-conversation-head p{margin:3px 0 0;color:#8f98a2;font-size:12px}
.mf-messages{overflow:auto;padding:14px;display:flex;flex-direction:column;gap:10px}.mf-message{max-width:82%;display:flex;gap:8px;align-items:flex-end}.mf-message.is-mine{align-self:flex-end;flex-direction:row-reverse}.mf-bubble{padding:10px 12px;border:1px solid rgba(218,197,141,.13);background:rgba(255,255,255,.045);border-radius:15px 15px 15px 4px;color:#e6dfd3;font-size:13px;line-height:1.45;white-space:pre-wrap;overflow-wrap:anywhere}.mf-message.is-mine .mf-bubble{background:linear-gradient(180deg,rgba(55,90,165,.40),rgba(26,48,96,.55));border-color:rgba(115,155,255,.32);border-radius:15px 15px 4px 15px}.mf-message-time{display:block;margin-top:5px;color:#948d80;font-size:10px}
.mf-compose{display:grid;grid-template-columns:40px minmax(0,1fr) 46px;gap:8px;padding:12px;border-top:1px solid rgba(218,197,141,.12);background:rgba(0,0,0,.45)}.mf-compose textarea{resize:none;min-height:42px;max-height:110px;padding:10px 12px;border:1px solid rgba(218,197,141,.18);border-radius:14px;background:rgba(255,255,255,.06);color:#f1eadb;outline:0}.mf-compose textarea:focus{border-color:rgba(218,197,141,.54)}.mf-compose button{border:1px solid rgba(218,197,141,.32);border-radius:999px;background:rgba(218,197,141,.14);color:#f1dfad;cursor:pointer}.mf-file-input{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}.mf-attach-button,.mf-send-button{width:42px;min-height:42px}.mf-attach-button{font-size:20px;line-height:1}.mf-send-button{font-size:18px}
@media (max-width:900px){.coalition-message-floater{display:none}}

.mf-message-status{padding:18px;color:#aaa293;text-align:center;font-size:13px}.mf-compose-error{color:#ffb5a8;font-size:12px;padding:0 14px 10px}.mf-compose button[disabled]{opacity:.55;cursor:wait}

.mf-attachment-preview{grid-column:1/-1;display:flex;flex-wrap:wrap;gap:6px;margin-top:2px}.mf-file-pill{display:inline-flex;align-items:center;gap:6px;max-width:100%;padding:5px 7px;border:1px solid rgba(218,197,141,.22);border-radius:999px;background:rgba(255,255,255,.05);color:#ddd4c0;font-size:11px}.mf-file-pill small{color:#9d9484}.mf-file-pill button{width:18px;height:18px;min-height:18px;border-radius:999px;padding:0;display:grid;place-items:center}
.mf-attachments{display:grid;gap:7px;margin-top:6px}.mf-attachment{color:#efe4c6;text-decoration:none;border:1px solid rgba(218,197,141,.18);background:rgba(0,0,0,.18);border-radius:10px;overflow:hidden}.mf-attachment:hover{border-color:rgba(218,197,141,.45)}.mf-attachment-image{display:grid}.mf-attachment-image img{display:block;width:100%;max-height:230px;object-fit:cover;background:#050709}.mf-attachment-image span{padding:6px 8px;color:#bfb6a5;font-size:11px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mf-attachment-file{display:flex;align-items:center;gap:9px;padding:8px}.mf-file-icon{width:28px;height:28px;display:grid;place-items:center;border:1px solid rgba(218,197,141,.25);border-radius:8px;color:#d8bd72}.mf-attachment-file small{display:block;color:#918a7d;font-size:10px;margin-top:2px}.mf-message-text:empty{display:none}


/* v4 scroll/reply repair:
   Attachment images increased the message column's min-content height in some browsers,
   pushing the composer below the panel and making the message area appear unscrollable.
   Force every grid/flex child in the active chat stack to allow internal scrolling. */
.mf-panel,
.mf-body,
.mf-chat-view,
.mf-conversation {
  min-height: 0;
}

.mf-chat-view {
  overflow: hidden;
}

.mf-conversation {
  overflow: hidden;
  grid-template-rows: 68px minmax(0, 1fr) auto;
}

.mf-messages {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.mf-compose {
  position: relative;
  z-index: 2;
  flex-shrink: 0;
}

.mf-compose textarea {
  min-width: 0;
}

.mf-attachment-image img {
  max-height: 170px;
  object-fit: contain;
}

.mf-message {
  min-width: 0;
}

.mf-bubble {
  max-width: 100%;
}

.mf-attachments {
  min-width: 0;
}

.mf-attachment {
  min-width: 0;
}
