/* NOMI private chat — flat full-width layout, QA only, 2026-11-03.
   This stylesheet intentionally loads LAST to supersede legacy bubble themes.
   Scope strictly to #nomiMessenger and the open private thread. */
html.nomi-chat-flat #nomiMessenger {
  --nomi-flat-header:#20102b;--nomi-flat-body:#3c2547;
  --nomi-flat-line:#80578f;--nomi-flat-pad:5px;
}
html.nomi-chat-flat #nomiMessenger[data-flat-size="xsmall"] {--nomi-flat-pad:2px;}
html.nomi-chat-flat #nomiMessenger[data-flat-size="small"] {--nomi-flat-pad:3px;}
html.nomi-chat-flat #nomiMessenger[data-flat-size="large"] {--nomi-flat-pad:6px;}
html.nomi-chat-flat #nomiMessenger[data-flat-size="xlarge"] {--nomi-flat-pad:7px;}
html.nomi-chat-flat #nomiMessenger:has(#nomiThread:not([hidden])) {
  max-width:100%!important; width:100%; padding:0!important;
  margin:0!important; box-sizing:border-box;
}
html.nomi-chat-flat #nomiMessenger:has(#nomiThread:not([hidden])) > h2 {display:none!important;}
html.nomi-chat-flat #nomiMessenger:has(#nomiThread:not([hidden])) > #nomiChatCustomizer {display:none!important;}
html.nomi-chat-flat #nomiMessenger #nomiThread:not([hidden]) {
  width:100%!important; max-width:none!important; min-width:0!important;
  display:flex!important; flex-direction:column!important;
  height:var(--nomi-thread-fit,calc(100dvh - 118px))!important;
  min-height:0!important; max-height:none!important; overflow:hidden!important;
  padding:0!important; margin:0!important;
  border:0!important; border-radius:0!important;
  box-shadow:none!important; background:#170821!important;
}
html.nomi-chat-flat body.nomi-chat-typing #nomiMessenger #nomiThread:not([hidden]),
html.nomi-chat-flat body.nomi-chat-keyboard-layout #nomiMessenger #nomiThread:not([hidden]) {
  height:var(--nomi-vv-height,var(--nomi-thread-fit,calc(100dvh - 118px)))!important;
}
/* Keep the existing linked avatar, title and presence in the header. */
html.nomi-chat-flat #nomiMessenger #nomiThread .nomi-thread-header {
  flex:0 0 auto!important; min-height:46px!important;
  padding:4px 5px!important; margin:0!important;
  border-bottom:1px solid var(--nomi-flat-line)!important;
  border-radius:0!important; box-shadow:none!important;
  gap:6px!important; flex-wrap:nowrap!important;
  background:#19091f!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread .nomi-thread-profile {
  flex:1 1 auto;min-width:0;display:flex;gap:6px;align-items:center;
}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenuButton {
  width:36px!important;flex:0 0 36px; font-size:23px;
}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu {
  top:46px!important; right:0!important;
}
html.nomi-chat-flat #nomiMessenger #nomiChatCustomizer .nomi-chat-style-controls {
  grid-template-columns: repeat(2,minmax(0,1fr)); gap:7px;
}
html.nomi-chat-flat #nomiMessenger #nomiChatCustomizer .nomi-chat-style-controls > label:has(#nomiChatColor),
html.nomi-chat-flat #nomiMessenger #nomiChatCustomizer .nomi-chat-border-color-row,
html.nomi-chat-flat #nomiMessenger #nomiChatCustomizer .nomi-chat-border-size-row {display:none!important;}
html.nomi-chat-flat #nomiMessenger #nomiChatCustomizer .nomi-chat-text-row {grid-column:1/-1;}
/* Composer: input first, thin one-line action bar second. */
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiSendForm.nomi-flat-composer {
  order:1!important; display:flex!important;flex-direction:column!important;
  width:100%!important; flex:0 0 auto!important;min-width:0!important;
  padding:4px 4px 0!important; margin:0!important;gap:2px!important;
  background:#200d2b!important; border:0!important; border-radius:0!important;
  box-shadow:none!important; transform:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-editor {
  position:relative; display:block;box-sizing:border-box;
  width:100%;min-width:0;flex:0 0 auto;
}
html.nomi-chat-flat #nomiMessenger #nomiSendForm #nomiMessageText,
html.nomi-chat-flat #nomiMessenger #nomiSendForm.nomi-private-inline-edit-active #nomiMessageText {
  display:block!important; width:100%!important; min-width:0!important;
  box-sizing:border-box!important; flex:none!important;
  min-height:37px!important; max-height:132px!important;
  height:37px; padding:7px 10px!important;margin:0!important;
  border:1px solid #9954c8!important; border-radius:10px!important;
  background:#351541!important;color:#fff!important;box-shadow:none!important;
  font:400 16px/1.4 system-ui,Arial,sans-serif!important;
  resize:none!important;overflow-x:hidden!important;overflow-y:auto;
  outline-offset:1px;transition:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiSendForm.nomi-private-inline-edit-active .nomi-private-inline-edit-field {
  position:relative!important;display:block!important;width:100%!important;
}
html.nomi-chat-flat #nomiMessenger #nomiSendForm.nomi-private-inline-edit-active #nomiMessageText {
  padding-right:40px!important;
}
html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-toolbar {
  display:flex!important;align-items:center;gap:4px;min-height:38px;
  width:100%;min-width:0;box-sizing:border-box;
  border-bottom:1px solid var(--nomi-flat-line);padding:1px 0 4px;
}
html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-toolbar button {
  display:inline-flex!important;justify-content:center;align-items:center;
  width:36px!important;min-width:36px!important;height:34px!important;
  min-height:34px!important;flex:0 0 36px!important;
  padding:0!important;margin:0!important;border-radius:8px!important;
  color:#f9edff!important;font-size:19px!important;
  border:1px solid #654174!important;background:#361547!important;
  box-shadow:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-toolbar #nomiSendButton {
  width:42px!important;min-width:42px!important;flex:0 0 42px!important;
  padding:0!important;font-size:20px!important;margin-left:auto!important;
  background:#9008b9!important;border-color:#b15ad6!important;
}
html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-toolbar .nomi-flat-mic {
  margin-left:0!important;
}
html.nomi-chat-flat #nomiMessenger #nomiSendForm.nomi-private-inline-edit-active
  .nomi-flat-toolbar :is(#nomiAttachToggle,#nomiEmojiToggle,#nomiVoiceToggle,#nomiFlatFileToggle) {
  display:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread :is(#nomiChatActions,#nomiReplyPreview,#nomiEmojiPanel,#nomiAttachPreview,#nomiChatStatus) {
  flex:0 0 auto!important;order:2!important;max-height:24dvh;overflow-y:auto;
  margin:0!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages.nomi-message-list {
  order:5!important;display:flex!important;flex-direction:column!important;
  gap:0!important;flex:1 1 auto!important;min-height:0!important;
  height:auto!important;max-height:none!important;
  width:100%!important;box-sizing:border-box!important;
  padding:0 2px 2px!important;margin:0!important;
  border:0!important;border-radius:0!important;background:#180a23!important;
  box-shadow:none!important;
  overflow-x:hidden!important;overflow-y:auto!important;
  overscroll-behavior-y:contain;-webkit-overflow-scrolling:touch;
  scroll-behavior:auto!important;
}
/* Hold back the whole message until decoration AND flat-header creation. */
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message:not([data-nomi-flat-ready="1"]) {
  visibility:hidden!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message,
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message.own {
  display:flex!important;flex-direction:column!important;
  box-sizing:border-box!important;align-self:stretch!important;
  width:100%!important;max-width:none!important;min-width:0!important;
  flex:0 0 auto!important;padding:0!important;margin:0!important;
  gap:0!important;border:0!important;
  border-bottom:1px solid var(--nomi-flat-line)!important;
  border-radius:0!important;background:transparent!important;
  box-shadow:none!important;transform:none!important;
  animation:none!important;transition:none!important;
  filter:none!important;backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  font-size:var(--nomi-chat-size,15px)!important;
  line-height:1.24!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-meta {
  order:0;display:flex;align-items:center;min-height:21px;
  gap:8px;padding:1px 5px;background:var(--nomi-flat-header);
  font-size:.82em;line-height:1.2;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-author {
  color:#f3aeef;font-weight:700;white-space:nowrap;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message.own .nomi-flat-author {
  color:#a8d8ff;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-meta time {
  font-size:1em!important;color:#c3b3ca!important;white-space:nowrap;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-menu {
  margin-left:auto;background:transparent;border:0;color:#e6d2f3;
  padding:0 7px; min-width:32px; min-height:30px;
  font-size:23px;line-height:1;cursor:pointer;
  border-radius:5px;touch-action:manipulation;
}
/* Small reply arrow next to ⋮; hidden legacy quick-action strip stays hidden. */
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-reply {
  display:inline-flex!important;align-items:center;justify-content:center;
  width:28px;min-width:28px;min-height:30px;padding:0 4px;margin:0;
  background:transparent!important;border:0!important;border-radius:4px;
  color:#e9ccff!important;font-size:19px;line-height:1;cursor:pointer;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-reply:focus-visible {
  outline:2px solid #d7a4ff;outline-offset:-2px;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-bubble,
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message.own .nomi-message-bubble {
  order:1;position:relative;display:block!important;
  box-sizing:border-box!important;width:100%!important;max-width:none!important;
  margin:0!important;min-width:0!important;
  padding:var(--nomi-flat-pad) 6px!important;
  border:0!important;border-radius:0!important;outline:0!important;
  background:var(--nomi-flat-body)!important;
  color:var(--nomi-chat-text,#f9efff)!important;
  box-shadow:none!important;cursor:default!important;
  font:inherit!important;line-height:1.28!important;
  text-shadow:none!important;transform:none!important;
  filter:none!important;backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-bubble > p {
  margin:0!important;padding:0!important;
  white-space:pre-wrap;overflow-wrap:anywhere;
  font:inherit!important;line-height:inherit!important;color:inherit!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-bubble > blockquote,
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-bubble > .nomi-chat-quote {
  margin:0 0 2px!important;padding:3px 5px!important;
  border:0!important;border-left:2px solid #c38fea!important;
  border-radius:4px!important;background:#674176!important;
  color:#f8ebff!important;box-shadow:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message.own .nomi-message-bubble {
  padding-right:32px!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-receipt {
  position:absolute;right:5px;bottom:4px;z-index:1;
  display:flex;align-items:center;justify-content:flex-end;
  pointer-events:none;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-receipt.sent {color:#aaa!important;}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-receipt.delivered {color:#aaa!important;}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-receipt.read {color:#38bdf8!important;}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-meta {display:none!important;}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-quick-actions,
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-tools {display:none!important;}
html.nomi-chat-flat #nomiMessenger #nomiMessages :is(.nomi-message-media-tray,.nomi-photo-grid) {
  width:100%!important;max-width:100%!important;align-self:stretch!important;
  border-radius:0!important;box-shadow:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message.nomi-has-media .nomi-message-bubble {
  width:100%!important;max-width:none!important;align-self:stretch!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message.selected {
  outline:1px solid #d7a4ff!important;outline-offset:-1px;
}
html.nomi-chat-flat #nomiMessenger #nomiThread * {scroll-behavior:auto!important;}
html.nomi-chat-flat #nomiMessenger #nomiThread :is(.nomi-message,.nomi-message-bubble,.nomi-flat-meta) {
  will-change:auto!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread .nomi-flat-menu:focus-visible {
  outline:2px solid #d7a4ff;outline-offset:-2px;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger {
  --nomi-flat-header:#e5d5f0;--nomi-flat-body:#faf4ff;--nomi-flat-line:#c7a8da;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThread:not([hidden]) {
  background:#fff7ff!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages.nomi-message-list {
  background:#fff7ff!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-bubble {
  color:var(--nomi-chat-text,#2a1637)!important;
}
@media(max-width:600px) {
  html.nomi-chat-flat #nomiMessenger #nomiThread .nomi-thread-header {
    min-height:42px!important;
  }
  html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-toolbar {gap:2px;}
  html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-toolbar button {
    width:32px!important;min-width:32px!important;flex-basis:32px!important;
  }
  html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-toolbar #nomiSendButton {
    min-width:40px!important;width:40px!important;flex:0 0 40px!important;
  }
}


/* QA corrective layer: keyboard viewport sizing must not override the established
   visualViewport-fed flex height used by the phone and 800px tablet. */
@media(max-width:800px){
  html.nomi-chat-flat body.nomi-chat-fixed-layout #nomiMessenger #nomiThread:not([hidden]),
  html.nomi-chat-flat body.nomi-chat-keyboard-layout.nomi-chat-fixed-layout #nomiMessenger #nomiThread:not([hidden]){
    height:auto!important;
    flex:1 1 auto!important;
    min-height:0!important;
    max-height:none!important;
    margin:0!important;
  }
}
/* Typing appears beside the name, never on a separate reserved row. */
html.nomi-chat-flat #nomiMessenger .nomi-thread-name-row {
  display:inline-flex!important;flex-direction:row!important;align-items:center!important;
  gap:6px!important;max-width:100%!important;min-width:0!important;
  white-space:nowrap!important;
}
html.nomi-chat-flat #nomiMessenger .nomi-typing-label {
  display:inline-block!important;flex:0 0 auto!important;
  min-width:76px!important;max-width:110px;
  overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
  font-size:11px;line-height:1.2;animation:none!important;
}
html.nomi-chat-flat #nomiMessenger .nomi-typing-label[hidden] {
  display:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiChatCustomizer .nomi-chat-style-controls > label:has(#nomiChatWeight),
html.nomi-chat-flat #nomiMessenger #nomiChatCustomizer .nomi-chat-style-controls > label:has(#nomiChatQuoteColor),
html.nomi-chat-flat #nomiMessenger #nomiChatCustomizer #nomiChatAppearancePreview,
html.nomi-chat-flat #nomiMessenger #nomiChatCustomizer .nomi-chat-appearance-hint {
  display:none!important;
}

/* The viewport-anchored action sheet lives under body, outside #nomiMessenger. */


/* Unified integration: private inline editing only, original Unified dialogs untouched. */
/* Compact private-message edit: same composer, no external banner or second frame. */
#nomiMessenger #nomiSendForm.nomi-private-inline-edit-active {
  min-width:0!important;gap:5px!important;
  padding:4px 5px max(4px,env(safe-area-inset-bottom))!important;
  border:0!important;box-shadow:none!important;background:transparent!important;
  align-items:flex-end!important;
}
#nomiMessenger #nomiSendForm.nomi-private-inline-edit-active .nomi-private-inline-edit-field {
  position:relative;display:block;flex:1 1 auto;min-width:0;width:100%;
  box-sizing:border-box;padding:0;margin:0;background:transparent;
}
#nomiMessenger #nomiSendForm.nomi-private-inline-edit-active .nomi-private-inline-edit-field > #nomiMessageText {
  box-sizing:border-box!important;display:block!important;
  width:100%!important;min-width:0!important;
  height:40px;min-height:40px!important;max-height:132px!important;
  margin:0!important;padding:7px 38px 7px 10px!important;
  resize:none!important;overflow-wrap:anywhere;overflow-x:hidden;
  font:400 16px/1.4 Arial,sans-serif!important;
  border:1px solid #9a65c1!important;border-radius:13px!important;
  color:var(--nomi-site-text,#fff)!important;
  background:var(--nomi-site-bg,#190d2a)!important;
}
#nomiMessenger #nomiSendForm.nomi-private-inline-edit-active .nomi-private-inline-edit-cancel {
  position:absolute;z-index:2;top:6px;right:5px;
  display:grid!important;place-items:center;flex:none;
  box-sizing:border-box;width:29px!important;height:29px!important;min-width:29px!important;min-height:29px!important;flex:0 0 29px!important;
  margin:0;padding:0;border:0;border-radius:9px;
  background:#4b3165;color:#fff;
  font:400 24px/1 Arial,sans-serif;cursor:pointer;
}
#nomiMessenger #nomiSendForm.nomi-private-inline-edit-active .nomi-private-inline-edit-cancel:focus-visible {
 outline:2px solid #d4a6f6;outline-offset:1px;
}
#nomiMessenger #nomiSendForm.nomi-private-inline-edit-active .nomi-private-inline-edit-cancel:disabled {opacity:.5;}
/* While correcting text, no attachments, stickers or voice send can be added. */
#nomiMessenger #nomiSendForm.nomi-private-inline-edit-active #nomiEmojiToggle,
#nomiMessenger #nomiSendForm.nomi-private-inline-edit-active #nomiAttachToggle,
#nomiMessenger #nomiSendForm.nomi-private-inline-edit-active #nomiVoiceToggle,
#nomiMessenger #nomiSendForm.nomi-private-inline-edit-active .nomi-mobile-compose-tools {
 display:none!important;
}
/* Keep the very same ➤ send control, without changing its icon. */
#nomiMessenger #nomiSendForm.nomi-private-inline-edit-active #nomiSendButton {
 display:inline-flex!important;align-items:center;justify-content:center;
 flex:0 0 auto;align-self:flex-end;margin-bottom:0!important;
}
html[data-nomi-theme="light"] #nomiMessenger #nomiSendForm.nomi-private-inline-edit-active .nomi-private-inline-edit-field > #nomiMessageText,
html[data-theme="light"] #nomiMessenger #nomiSendForm.nomi-private-inline-edit-active .nomi-private-inline-edit-field > #nomiMessageText {
 background:#fff!important;color:#391b51!important;border-color:#a276c9!important;
}
html[data-nomi-theme="light"] #nomiMessenger #nomiSendForm.nomi-private-inline-edit-active .nomi-private-inline-edit-cancel,
html[data-theme="light"] #nomiMessenger #nomiSendForm.nomi-private-inline-edit-active .nomi-private-inline-edit-cancel {
 background:#e9d9f4;color:#381a56;
}
@media(max-width:767px){
 #nomiMessenger #nomiSendForm.nomi-mobile-composer.nomi-private-inline-edit-active {
  display:grid!important;grid-template-columns:minmax(0,1fr) 46px!important;
  gap:5px!important;padding:3px 4px max(3px,env(safe-area-inset-bottom))!important;
 }
 #nomiMessenger #nomiSendForm.nomi-mobile-composer.nomi-private-inline-edit-active .nomi-mobile-compose-editor {
  grid-column:1!important;min-width:0!important;width:100%!important;
  background:transparent!important;border:0!important;box-shadow:none!important;
 }
 #nomiMessenger #nomiSendForm.nomi-mobile-composer.nomi-private-inline-edit-active .nomi-private-inline-edit-field {
  width:100%!important;
 }
 #nomiMessenger #nomiSendForm.nomi-mobile-composer.nomi-private-inline-edit-active #nomiSendButton {
  grid-column:2!important;height:42px!important;min-height:42px!important;
  width:42px!important;min-width:42px!important;margin:0!important;
  border-radius:12px!important;
 }
}

/* Only while a real private conversation is open: recover height used by
   the secondary "Download app" CTA, never remove it from other pages. */
html.nomi-chat-flat body:has(#nomiMessenger:not([hidden]) #nomiThread:not([hidden])) .nomi-app-beta-cta {
  display:none!important;
}
html.nomi-chat-flat body:has(#nomiMessenger:not([hidden]) #nomiThread:not([hidden])) #pageScreen {
  min-height:0!important;
}

/* In the authenticated private-thread view remove the GLOBAL under-header
   APK download strip. Preserve its visibility in other NOMI sections. */
html.nomi-chat-flat body:has(#nomiMessenger:not([hidden]) #nomiThread:not([hidden])) #nomiGlobalDownload {
  display:none!important;
}

/* Match Foiz-style full-width nickname bar: ⋮ pinned at far right for BOTH
   incoming and own messages, rather than inheriting legacy bubble alignment. */
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message,
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message.own{
  align-items:stretch!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-meta{
  width:100%!important;min-width:0!important;max-width:none!important;
  box-sizing:border-box!important;align-self:stretch!important;flex:0 0 auto!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-menu{
  margin-left:auto!important;flex:0 0 32px;
}

/* QA 2026-11-04: nickname inline with the body, no extra nickname row. */
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-bubble .nomi-flat-meta {
  float:right!important;position:relative!important;
  display:inline-flex!important;align-items:center!important;
  width:auto!important;max-width:55%!important;min-width:0!important;
  min-height:0!important;align-self:auto!important;
  gap:3px!important;padding:0 1px 0 4px!important;margin:0 0 2px 5px!important;
  background:transparent!important;border:0!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-bubble .nomi-flat-meta > .nomi-flat-author {
  display:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message:not(:has(.nomi-flat-author-inline)) .nomi-message-bubble .nomi-flat-meta > .nomi-flat-author {
  display:inline!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-bubble > p > .nomi-flat-author-inline {
  display:inline!important;color:#f3aeef!important;font-weight:700!important;white-space:nowrap;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message.own .nomi-message-bubble > p > .nomi-flat-author-inline {
  color:#a8d8ff!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message:not(:has(.nomi-flat-author-inline)) .nomi-message-bubble .nomi-flat-meta,
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message:has(.nomi-media-only) .nomi-message-bubble .nomi-flat-meta {
  float:none!important;width:100%!important;max-width:none!important;
  margin:0!important;padding:0!important;justify-content:space-between!important;
}


/* NOMI 2026-11-05 QA: owner-approved compact violet message cards.
   Newest messages directly below the composer; typing status is untouched.
   Scoped to private chat; no changes to games, communities or production. */
html.nomi-chat-flat #nomiMessenger {
  --nomi-flat-header:#281431;
  --nomi-flat-body:#50305c;
  --nomi-flat-own:#422d60;
  --nomi-flat-line:#79508c;
  --nomi-chat-card-gap:5px;
}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages.nomi-message-list {
  background:#17091f!important;
  gap:var(--nomi-chat-card-gap)!important;
  padding:4px 5px 10px!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message,
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message.own {
  display:flex!important;
  flex-direction:column!important;
  margin:0!important;
  padding:0!important;
  border:1px solid var(--nomi-flat-line)!important;
  border-radius:11px!important;
  overflow:hidden;
  background:var(--nomi-flat-header)!important;
  align-items:stretch!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message > .nomi-flat-meta {
  display:flex!important;
  order:0!important;
  align-items:center!important;
  gap:8px!important;
  width:100%!important;
  min-height:30px!important;
  padding:3px 9px!important;
  border:0!important;
  border-radius:10px 10px 0 0!important;
  background:var(--nomi-flat-header)!important;
  color:#f4daff!important;
  box-sizing:border-box!important;
  line-height:1.2!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-meta .nomi-flat-author {
  display:inline!important;
  flex:0 1 auto!important;
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  color:#efbce8!important;
  font-size:var(--nomi-chat-size,16px)!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message.own .nomi-flat-meta .nomi-flat-author {
  color:#a8ddff!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message > .nomi-flat-meta time {
  margin-left:auto!important;
  white-space:nowrap!important;
  color:#e2cfeb!important;
  font:400 12px/1.15 system-ui,Arial,sans-serif!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message > .nomi-flat-meta .nomi-flat-menu {
  margin:0 0 0 3px!important;
  padding:0!important;
  flex:0 0 30px!important;
  min-height:28px!important;
  border-radius:7px!important;
  font-size:22px!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message > .nomi-message-bubble,
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message.own > .nomi-message-bubble {
  order:1!important;
  position:relative!important;
  width:100%!important;
  min-height:43px!important;
  margin:0!important;
  padding:8px 12px 29px!important;
  background:var(--nomi-flat-body)!important;
  border:0!important;
  border-radius:0 0 10px 10px!important;
  color:var(--nomi-chat-text,#ffebc5)!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  font-family:var(--nomi-chat-font,system-ui)!important;
  font-weight:var(--nomi-chat-weight,400)!important;
  line-height:1.35!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message.own > .nomi-message-bubble {
  background:var(--nomi-flat-own)!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-bubble > p > .nomi-flat-author-inline {display:none!important;}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message > .nomi-message-bubble > .nomi-flat-reply {
  display:inline-flex!important;
  position:absolute!important;
  right:8px!important;
  bottom:1px!important;
  width:31px!important;
  min-height:27px!important;
  font-size:20px!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message.own > .nomi-message-bubble > .nomi-flat-reply {
  right:46px!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-receipt {right:9px!important;bottom:6px!important;}
html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-toolbar {
  gap:5px!important;
  padding:3px 2px 5px!important;
  min-width:0;
}
html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-toolbar #nomiSendButton {
  order:0!important;
  flex:0 0 auto!important;
  width:auto!important;
  min-width:84px!important;
  max-width:105px!important;
  min-height:34px!important;
  padding:0 10px!important;
  margin:0!important;
  border:1px solid #b464e1!important;
  border-radius:9px!important;
  background:linear-gradient(125deg,#7c37ae,#9a44d0)!important;
  color:#fff!important;
  font:600 12px/1 system-ui,Arial,sans-serif!important;
  white-space:nowrap!important;
}
html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-toolbar #nomiAttachToggle {
  border:1px solid #af78d9!important;
  background:linear-gradient(135deg,#614081,#3a2652)!important;
  box-shadow:inset 0 0 0 1px #ae89c133!important;
  border-radius:9px!important;
}
html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-toolbar .nomi-flat-mic {
  margin-left:auto!important;
}
html.nomi-chat-flat #nomiMessenger #nomiSendForm #nomiMessageText {
  border-radius:10px!important;
  background:#321c43!important;
}
html.nomi-chat-flat #nomiMessenger #nomiSendForm #nomiAttachPreview:not([hidden]),
html.nomi-chat-flat #nomiMessenger #nomiSendForm #nomiEmojiPanel:not([hidden]) {
  background:#2d1b3d!important;
  border:1px solid #8355a6!important;
  border-radius:10px!important;
  padding:6px!important;
  max-height:min(150px,28dvh)!important;
  overflow:auto!important;
}
html.nomi-chat-flat body > .nomi-message-popover.nomi-message-action-sheet {
  box-sizing:border-box!important;
  width:max-content!important;
  max-width:min(242px,calc(100vw - 16px))!important;
  min-width:0!important;
  max-height:min(32dvh,230px)!important;
  padding:5px!important;
  border:1px solid #8e60ac!important;
  border-radius:11px!important;
  background:linear-gradient(155deg,#302040,#20132c)!important;
  color:#f4e8ff!important;
  box-shadow:0 8px 22px #0d0717aa!important;
  scrollbar-width:thin;
}
html.nomi-chat-flat body > .nomi-message-popover.nomi-message-action-sheet > button {
  display:block!important;
  width:100%!important;
  min-height:34px!important;
  padding:6px 9px!important;
  margin:1px 0!important;
  border:0!important;
  border-radius:7px!important;
  background:transparent!important;
  color:#f5e9ff!important;
  text-align:left!important;
  font:500 13px/1.25 system-ui,Arial,sans-serif!important;
}
html.nomi-chat-flat body > .nomi-message-popover.nomi-message-action-sheet > button:focus-visible,
html.nomi-chat-flat body > .nomi-message-popover.nomi-message-action-sheet > button:hover {
  background:#503369!important;
  outline:2px solid #c39fec;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu {
  box-sizing:border-box!important;
  width:min(272px,calc(100vw - 18px))!important;
  max-height:min(32dvh,230px)!important;
  overflow:auto!important;
  border:1px solid #8d62ac!important;
  border-radius:12px!important;
  padding:7px!important;
  background:#2a1a39!important;
  color:#f5e8ff!important;
}
html.nomi-chat-flat #nomiMessenger #nomiChatCustomizer {
  background:transparent!important;
  padding:5px!important;
}
html.nomi-chat-flat #nomiMessenger #nomiChatCustomizer .nomi-chat-style-controls select {
  border:1px solid #8e67ab!important;
  background:#422950!important;
  color:#fff1ff!important;
  border-radius:8px!important;
  min-height:34px;
}
html.nomi-chat-flat #nomiMessenger #nomiChatCustomizer .nomi-chat-style-controls select option {
  color:#f2e6ff;
  background:#30203e;
}
/* Compact photo thumbnails: single and multi-photo share the same geometry. */
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-media-tray,
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-media-tray.nomi-photo-grid {
  display:flex!important;
  flex-direction:row!important;
  flex-wrap:wrap!important;
  align-items:flex-start!important;
  gap:5px!important;
  width:auto!important;
  max-width:100%!important;
}
/* Always place multiple photos in ONE horizontal row, never a second row.
   On narrow screens the row itself scrolls, preserving the chat width. */
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-media-tray.nomi-photo-grid {
  flex-wrap:nowrap!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:thin;
  overscroll-behavior-inline:contain;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-photo-grid > .nomi-chat-media-image {
  flex:0 0 min(130px,33vw)!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-media-tray .nomi-chat-media-image,
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-photo-grid .nomi-chat-media-image {
  box-sizing:border-box!important;
  width:min(130px,33vw)!important;
  max-width:min(130px,33vw)!important;
  height:min(130px,33vw)!important;
  border-radius:8px!important;
  overflow:hidden!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-media-tray .nomi-chat-media-image img {
  width:100%!important;
  max-width:100%!important;
  height:100%!important;
  max-height:100%!important;
  object-fit:cover!important;
  border-radius:8px!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger {
  --nomi-flat-header:#e6d3ed;
  --nomi-flat-body:#f8ecfb;
  --nomi-flat-own:#dedaf7;
  --nomi-flat-line:#a681be;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-meta .nomi-flat-author {
  color:#62234f!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message.own .nomi-flat-meta .nomi-flat-author {
  color:#193e70!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-meta time,
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-menu {
  color:#3a2447!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-bubble {
  color:var(--nomi-chat-text,#31163f)!important;
}
@media(max-width:600px) {
  html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-toolbar {gap:3px!important;}
  html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-toolbar #nomiSendButton {
    flex:0 0 auto!important;
    width:auto!important;
    min-width:75px!important;
    padding:0 6px!important;
    font-size:11px!important;
  }
  html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-toolbar .nomi-flat-mic {
    margin-left:auto!important;
  }
  html.nomi-chat-flat #nomiMessenger #nomiThreadMenu {
    width:min(250px,calc(100vw - 12px))!important;
    max-height:min(30dvh,210px)!important;
  }
}

html.nomi-chat-flat #nomiMessenger #nomiMessages {overflow-anchor:none;}
html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-photo-picker {
  box-sizing:border-box;
  width:min(248px,calc(100% - 24px));
  max-height:70dvh;
  overflow:auto;
  padding:10px;
  border:1px solid #9566ac;
  border-radius:12px;
  background:#2c1c3a;
  color:#f5e8ff;
}
html.nomi-chat-flat #nomiMessenger .nomi-flat-photo-picker::backdrop {background:#160e22a6;}
html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-photo-picker[open] {display:grid;gap:5px;}
html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-photo-picker button,
html.nomi-chat-flat #nomiMessenger #nomiChatCustomizer .nomi-flat-format-choices button {
  border:1px solid #9268ae;
  border-radius:7px;
  background:#49305d;
  color:#fff;
  font:500 12px/1.2 system-ui,sans-serif;
  padding:5px 7px;
  min-height:30px;
}
.nomi-flat-format-choices,.nomi-flat-format-preview {display:none;}
html.nomi-chat-flat #nomiMessenger #nomiChatCustomizer .nomi-chat-style-controls {
  grid-template-columns:minmax(0,1fr);
}
html.nomi-chat-flat #nomiMessenger #nomiChatCustomizer :is(#nomiChatFont,#nomiChatSize,#nomiChatTextColor) {
  display:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiChatCustomizer .nomi-flat-format-choices {
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  margin-block:5px;
}
html.nomi-chat-flat #nomiMessenger #nomiChatCustomizer .nomi-flat-format-colors button {
  flex:0 0 28px;
  min-width:28px;
  min-height:28px;
  border-radius:50%;
  padding:0;
  background:var(--swatch,#49305d);
}
html.nomi-chat-flat #nomiMessenger #nomiChatCustomizer .nomi-flat-format-choices button[aria-pressed="true"] {
  outline:2px solid #f0d6ff;
  outline-offset:-3px;
}
html.nomi-chat-flat #nomiMessenger #nomiChatCustomizer .nomi-flat-format-preview {
  display:block;
  margin:0;
  padding:6px;
  border-radius:7px;
  background:var(--nomi-flat-body);
  color:var(--nomi-chat-text);
  font-family:var(--nomi-chat-font);
  font-size:var(--nomi-chat-size);
  overflow-wrap:anywhere;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages.nomi-message-list {
  background:#f5eef9!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThread #nomiSendForm.nomi-flat-composer {
  background:#f2e7f8!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiSendForm #nomiMessageText {
  background:#fff9ff!important;
  color:#362143!important;
}

html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-bubble > .nomi-chat-reactions {
  justify-content:flex-start!important;
  flex-wrap:wrap!important;
  max-width:calc(100% - 72px);
  gap:4px!important;
  margin:4px 0 -23px!important;
  min-height:26px;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-reaction-count {
  border:1px solid var(--nomi-flat-line);
  border-radius:7px;
  font-size:12px;
  padding:1px 3px;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-bubble > .nomi-chat-reactions {
  display:flex!important;
  align-items:center;
  position:relative;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-chat-reaction-picker > summary {
  display:grid!important;
  place-items:center;
  box-sizing:border-box;
  width:28px;
  height:26px;
  cursor:pointer;
}

/* 2026-11-05 R2 screenshot fixes. Private chat only. Keep the existing
   authenticated receipt/typing/attachment handlers and user text preferences. */
html.nomi-chat-flat #nomiMessenger {
  --nomi-flat-header:#47304f;
  --nomi-flat-body:#675078;
  --nomi-flat-own:#594777;
  --nomi-flat-line:#b38bc4;
}
html.nomi-chat-flat #nomiMessenger #nomiThread .nomi-thread-header {
  background:#3b2547!important;
  border-bottom:1px solid #a47cb8!important;
  color:#faf1ff!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread .nomi-thread-header
:is(#nomiThreadTitle,.nomi-thread-name-row,.nomi-thread-profile,.nomi-thread-profile small,.nomi-thread-status,.nomi-presence,.nomi-typing-label) {
  color:#fff3ff!important;
  opacity:1!important;
  text-shadow:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread .nomi-thread-header .nomi-typing-label:not([hidden]) {
  color:#e2c0ff!important;
  font-weight:600!important;
  visibility:visible!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread .nomi-thread-header :is(button,.nomi-outline) {
  background:#71538c!important;
  border-color:#b995cb!important;
  color:#fff6ff!important;
}
html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-toolbar
:is(#nomiAttachToggle,#nomiEmojiToggle,#nomiVoiceToggle,#nomiFlatFileToggle) {
  background:#735496!important;
  border:1px solid #ac8dca!important;
  color:#fff!important;
}
html.nomi-chat-flat #nomiMessenger #nomiSendForm #nomiMessageText {
  background:#4d365b!important;
  color:#fff7ff!important;
  border:1px solid #bd98d2!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message > .nomi-message-bubble {
  color:var(--nomi-chat-text,#fff8ff)!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-reply {
  color:#fff3ff!important;
  background:#75578d!important;
  border:1px solid #ac83c6!important;
  border-radius:7px!important;
  opacity:1!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-receipt .nomi-receipt {
  opacity:1!important;
  visibility:visible!important;
  transition:none!important;
  animation:none!important;
  font-weight:700!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-receipt:is(.sent,.delivered) {
  color:#f3dfff!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-receipt.read {
  color:#8de5ff!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-bubble .nomi-message-media-tray {
  display:flex!important;
  flex-flow:row nowrap!important;
  gap:5px!important;
  width:max-content!important;
  max-width:100%!important;
  margin:0 0 5px!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  min-height:0!important;
  overflow-x:auto!important;
  overflow-y:hidden!important;
  scrollbar-width:thin;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages
:is(.nomi-message-media-tray .nomi-chat-media-image,.nomi-photo-grid > .nomi-chat-media-image) {
  flex:0 0 auto!important;
  box-sizing:border-box!important;
  width:min(88px,24vw)!important;
  max-width:min(88px,24vw)!important;
  height:min(88px,24vw)!important;
  max-height:min(88px,24vw)!important;
  aspect-ratio:1 / 1!important;
  overflow:hidden!important;
  border-radius:7px!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages
.nomi-message-media-tray .nomi-chat-media-image img {
  display:block!important;
  width:100%!important;
  height:100%!important;
  object-fit:cover!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message.nomi-has-media > .nomi-message-bubble {
  min-height:0!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message.nomi-has-media > .nomi-message-bubble > p {
  margin:2px 0 0!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages.nomi-message-list {
  overflow-anchor:none!important;
  scroll-behavior:auto!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread :is(.nomi-message,.nomi-message-bubble,.nomi-flat-meta) {
  animation:none!important;
  transition:none!important;
}
body > .nomi-message-popover.nomi-message-action-sheet {
  background:#604675!important;
  border:1px solid #b996ce!important;
  box-shadow:0 10px 25px #130b20b0!important;
  color:#fff7ff!important;
}
body > .nomi-message-popover.nomi-message-action-sheet > button {
  min-height:40px!important;
  border-radius:8px!important;
  color:#fff8ff!important;
  background:#74578c!important;
  margin:3px 0!important;
  padding:8px 12px!important;
}
body > .nomi-message-popover.nomi-message-action-sheet > button:is(:hover,:focus-visible,:active) {
  background:#906eae!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu {
  background:#654976!important;
  border-color:#b896ca!important;
  color:#fff6ff!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu :is(button,.nomi-outline,select) {
  min-height:38px!important;
  background:#795b95!important;
  color:#fff6ff!important;
  border:1px solid #ba9bd1!important;
  border-radius:8px!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger {
  --nomi-flat-header:#eddcf4;
  --nomi-flat-body:#fcf5ff;
  --nomi-flat-own:#ebe4fa;
  --nomi-flat-line:#bb9bc9;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThread .nomi-thread-header {
  background:#f4e5f7!important;
  color:#31203f!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThread .nomi-thread-header
:is(#nomiThreadTitle,.nomi-thread-name-row,.nomi-thread-profile,.nomi-thread-profile small,.nomi-thread-status,.nomi-presence,.nomi-typing-label) {
  color:#34203f!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThread .nomi-thread-header .nomi-typing-label:not([hidden]) {
  color:#63357f!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThread .nomi-thread-header :is(button,.nomi-outline) {
  background:#eee0f5!important;
  border-color:#9a70b1!important;
  color:#38214e!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiSendForm #nomiMessageText {
  background:#fff9ff!important;
  color:#281730!important;
  border-color:#a781be!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message > .nomi-message-bubble {
  color:var(--nomi-chat-text,#2e193c)!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-reply {
  color:#402451!important;
  background:#e8d8f3!important;
  border:1px solid #9d7aad!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiMessages .nomi-receipt:is(.sent,.delivered) {
  color:#554368!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiMessages .nomi-receipt.read {
  color:#176d9e!important;
}
html[data-nomi-theme="light"] body > .nomi-message-popover.nomi-message-action-sheet,
html[data-nomi-theme="light"] #nomiMessenger #nomiThreadMenu {
  background:#f2e4f8!important;
  border-color:#a985bb!important;
  color:#311a42!important;
}
html[data-nomi-theme="light"] body > .nomi-message-popover.nomi-message-action-sheet > button,
html[data-nomi-theme="light"] #nomiMessenger #nomiThreadMenu :is(button,.nomi-outline,select) {
  background:#e3d1ef!important;
  border-color:#b197c2!important;
  color:#322141!important;
}

/* Same-site photo action sheet; the Android OS picker invoked afterwards is native. */
html.nomi-chat-flat body > .nomi-flat-photo-backdrop {
  position:fixed!important;inset:0!important;
  z-index:2147483000!important;
  display:flex!important;align-items:center!important;justify-content:center!important;
  padding:12px!important;box-sizing:border-box!important;
  background:#140a20b8!important;
}
html.nomi-chat-flat body > .nomi-flat-photo-backdrop > .nomi-flat-photo-dialog {
  width:min(100%,310px)!important;
  max-height:min(80dvh,460px)!important;
  padding:14px!important;
  box-sizing:border-box!important;
  display:flex!important;flex-direction:column!important;gap:8px!important;
  overflow:auto!important;
  background:#674b7e!important;color:#fff7ff!important;
  border:1px solid #b797ca!important;border-radius:13px!important;
  box-shadow:0 14px 38px #150e20bb!important;
}
html.nomi-chat-flat body > .nomi-flat-photo-backdrop > .nomi-flat-photo-dialog > strong {
  font:700 17px/1.25 system-ui,Arial,sans-serif!important;
  margin:0 0 5px!important;
}
html.nomi-chat-flat body > .nomi-flat-photo-backdrop > .nomi-flat-photo-dialog > button {
  width:100%!important;min-height:44px!important;
  display:block!important;
  padding:10px 14px!important;
  margin:0!important;
  text-align:center!important;
  font:600 15px/1.25 system-ui,Arial,sans-serif!important;
  border:1px solid #c6a6dc!important;
  border-radius:9px!important;
  background:#8769a2!important;color:#fffaff!important;
  cursor:pointer!important;
}
html.nomi-chat-flat body > .nomi-flat-photo-backdrop > .nomi-flat-photo-dialog > button:is(:active,:hover,:focus-visible) {
  background:#9e80b8!important;outline:2px solid #f4d7ff!important;
}
html.nomi-chat-flat body > .nomi-flat-photo-backdrop > .nomi-flat-photo-dialog > button.nomi-flat-photo-cancel {
  background:#513861!important;
}
html[data-nomi-theme="light"].nomi-chat-flat body > .nomi-flat-photo-backdrop > .nomi-flat-photo-dialog {
  background:#f8edfc!important;color:#30203e!important;
  border-color:#aa85c1!important;
}
html[data-nomi-theme="light"].nomi-chat-flat body > .nomi-flat-photo-backdrop > .nomi-flat-photo-dialog > button {
  background:#e4d3ef!important;
  color:#342243!important;
  border-color:#ae8fc2!important;
}
html[data-nomi-theme="light"].nomi-chat-flat body > .nomi-flat-photo-backdrop > .nomi-flat-photo-dialog > button.nomi-flat-photo-cancel {
  background:#efe3f4!important;
}

/* Compact two-band cards and the chat header. */
html.nomi-chat-flat #nomiMessenger {
  --nomi-flat-header:#1b1228;
  --nomi-flat-body:#281d37;
  --nomi-flat-own:#2e2140;
  --nomi-flat-icon:#bcb4c6;
  --nomi-flat-divider:#180f23;
  --nomi-flat-action:#ead9f7;
  --nomi-flat-action-bg:#2c1c3e;
  --nomi-flat-action-line:#806296;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger {
  --nomi-flat-header:#e8d7f4;
  --nomi-flat-body:#fcf8ff;
  --nomi-flat-own:#f7f0fc;
  --nomi-flat-icon:#655b70;
  --nomi-flat-divider:#c9b8d6;
  --nomi-flat-action:#442655;
  --nomi-flat-action-bg:#f3e9fb;
  --nomi-flat-action-line:#a98bbc;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message > .nomi-flat-meta {
  gap:4px!important;
  padding:1px 6px!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message > .nomi-flat-meta time {
  margin:0 auto 0 0!important;
  font-size:11px!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message > .nomi-flat-meta > :is(.nomi-flat-menu,.nomi-flat-reply),
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-meta .nomi-chat-reaction-picker > summary {
  position:static!important;
  flex:0 0 28px!important;
  width:28px!important;
  min-width:28px!important;
  min-height:28px!important;
  margin:0!important;
  padding:0!important;
  color:var(--nomi-flat-icon)!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-meta :is(.nomi-flat-menu,.nomi-flat-reply,summary):focus-visible {
  outline:2px solid var(--nomi-flat-icon)!important;
  outline-offset:-2px;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-meta :is(.nomi-chat-reactions,.nomi-chat-reaction-picker) {
  display:flex!important;
  flex:0 0 auto!important;
  margin:0!important;
  padding:0!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-meta .nomi-flat-receipt {
  position:static!important;
  flex:0 0 auto;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-meta .nomi-receipt {
  font-size:15px!important;
  margin:0!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message > .nomi-message-bubble,
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message.own > .nomi-message-bubble {
  min-height:0!important;
  padding:5px 8px!important;
}
html.nomi-chat-flat #nomiMessenger .nomi-thread-name-row {
  flex-direction:column!important;
  align-items:flex-start!important;
  gap:1px!important;
}
html.nomi-chat-flat #nomiMessenger .nomi-typing-label {
  min-width:0!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu .nomi-flat-format-colors button {
  background:var(--nomi-flat-action-bg)!important;
  color:var(--swatch,var(--nomi-flat-action))!important;
  border-color:var(--nomi-flat-action-line)!important;
  border-radius:7px!important;
  min-height:28px!important;
  font-weight:800!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-format-choices button[aria-pressed="true"] {
  outline-color:#58377c;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-photo-picker {
  background:#f2e4f8;
  color:#311a42;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-photo-picker button,
html[data-nomi-theme="light"].nomi-chat-flat body > .nomi-chat-reaction-options.nomi-reaction-portal > button {
  background:#f5ebfb!important;
  color:#3b244d!important;
  border-color:#ad91be!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-bubble > :is(blockquote,.nomi-chat-quote) {
  background:var(--nomi-chat-quote-bg,#e9daf4)!important;
  color:var(--nomi-chat-quote-text,#38214e)!important;
}
html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-toolbar
:is(#nomiAttachToggle,#nomiFlatFileToggle) {
  width:auto!important;
  min-width:42px!important;
  flex:0 0 auto!important;
  padding:0 5px!important;
  font-size:12px!important;
}

/* Message controls are bare glyphs with their existing touch targets. */
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages.nomi-message-list {
  gap:0!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message,
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message.own {
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message + .nomi-message,
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message + .nomi-message.own {
  border-top:2px solid var(--nomi-flat-divider)!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message > .nomi-flat-meta,
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message > .nomi-message-bubble,
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message.own > .nomi-message-bubble {
  border-radius:0!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message:not(.own) > .nomi-message-bubble {
  color:var(--nomi-chat-text-incoming,var(--nomi-flat-action))!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message.own > .nomi-message-bubble {
  color:var(--nomi-chat-text-own,var(--nomi-flat-action))!important;
}
.nomi-flat-color-target {display:none;}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-color-target {
  display:grid;
  grid-template-columns:minmax(0,1fr) minmax(0,1fr);
  gap:4px;
  margin:5px 0;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-color-target > button {
  min-height:32px!important;
  margin:0;
  padding:4px;
  font:600 11px/1.2 system-ui,sans-serif;
  background:var(--nomi-flat-action-bg)!important;
  color:var(--nomi-flat-action)!important;
  border-color:var(--nomi-flat-action-line)!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-color-target > button[aria-pressed="true"] {
  outline:2px solid var(--nomi-flat-icon);
  outline-offset:-3px;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-format-preview {
  padding:0;
  background:transparent;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-format-preview > p {
  margin:2px 0;
  padding:4px 6px;
  border-radius:5px;
  background:var(--nomi-flat-body);
  color:var(--nomi-chat-text-incoming,var(--nomi-flat-action));
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-format-preview > p:first-child {
  background:var(--nomi-flat-own);
  color:var(--nomi-chat-text-own,var(--nomi-flat-action));
}

/* NOMI R6 2026-11-05 — LOCK THE DARK MESSAGE ACTION BAR TO 14px.
   Only message body text scales; names, time, reactions, replies and menus
   retain the height and proportions of the 14px message setting. */
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message > .nomi-flat-meta {
  flex:0 0 30px!important;
  box-sizing:border-box!important;
  height:30px!important;
  min-height:30px!important;
  max-height:30px!important;
  padding:1px 6px!important;
  font:500 14px/1.1 system-ui,Arial,sans-serif!important;
  overflow:hidden!important;
  white-space:nowrap!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message > .nomi-flat-meta .nomi-flat-author {
  font-size:14px!important;
  line-height:1.15!important;
  min-width:0!important;
  overflow:hidden!important;
  text-overflow:ellipsis!important;
  white-space:nowrap!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message > .nomi-flat-meta time {
  font-size:11px!important;
  line-height:1.15!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages > .nomi-message > .nomi-flat-meta
  :is(.nomi-flat-menu,.nomi-flat-reply,.nomi-chat-reaction-picker > summary) {
  height:28px!important;
  max-height:28px!important;
  flex-shrink:0!important;
}

/* Fixed right-side sheet directly under the conversation's ☰ button. */
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu {
  position:absolute!important;
  left:auto!important;
  right:4px!important;
  top:48px!important;
  z-index:80!important;
  box-sizing:border-box!important;
  width:min(340px,calc(100vw - 12px))!important;
  max-width:calc(100vw - 12px)!important;
  max-height:min(76dvh,570px)!important;
  overflow-x:hidden!important;
  overflow-y:auto!important;
  overscroll-behavior:contain;
  margin:0!important;
  padding:8px!important;
  background:#242030!important;
  border:1px solid #665574!important;
  border-radius:12px!important;
  color:#f2ebf8!important;
  box-shadow:0 12px 30px #080411a8!important;
  scrollbar-width:thin;
}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu[hidden] {
  display:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu #nomiChatCustomizer {
  max-width:100%!important;
  min-width:0!important;
  margin:0 0 6px!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  font:500 12px/1.35 system-ui,Arial,sans-serif!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu #nomiChatCustomizer > summary {
  padding:6px 8px!important;
  border-radius:8px!important;
  background:#33283f!important;
  color:#efe4f8!important;
  font:650 13px/1.25 system-ui,Arial,sans-serif!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-chat-style-controls {
  display:grid!important;
  grid-template-columns:minmax(0,1fr)!important;
  gap:4px!important;
  min-width:0!important;
  max-width:100%!important;
  margin-top:5px!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-chat-style-controls > label {
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
  gap:3px!important;
  font-size:12px!important;
  color:#e2d5ee!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-color-target {
  display:grid!important;
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:5px!important;
  margin:4px 0 6px!important;
  min-width:0!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-color-target > button {
  min-width:0!important;
  height:36px!important;
  min-height:36px!important;
  max-height:36px!important;
  padding:4px!important;
  background:#30283d!important;
  border:1px solid #685776!important;
  border-radius:8px!important;
  color:#eee3f7!important;
  font:600 12px/1.15 system-ui,Arial,sans-serif!important;
  white-space:normal!important;
  overflow-wrap:anywhere;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-color-target > button[aria-pressed="true"] {
  background:#514060!important;
  border-color:#c0a1da!important;
  color:#fffaff!important;
  outline:1px solid #c0a1da!important;
  outline-offset:-3px!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-format-colors {
  display:grid!important;
  grid-template-columns:repeat(8,minmax(0,1fr))!important;
  gap:5px!important;
  margin:4px 0 7px!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-format-colors > button {
  display:grid!important;
  place-items:center!important;
  min-width:0!important;
  width:100%!important;
  height:28px!important;
  min-height:28px!important;
  padding:0!important;
  border:1px solid #79678a!important;
  border-radius:7px!important;
  background:var(--swatch,#393047)!important;
  color:transparent!important;
  font-size:0!important;
  box-shadow:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-format-colors > button:first-child {
  background:#393047!important;
  color:#f6efff!important;
  font:700 13px/1 system-ui,Arial,sans-serif!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-format-colors > button[aria-pressed="true"] {
  outline:2px solid #e2caff!important;
  outline-offset:1px!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-format-choices:not(.nomi-flat-format-colors) {
  gap:4px!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-format-choices:not(.nomi-flat-format-colors) > button {
  padding:4px 6px!important;
  background:#332940!important;
  border:1px solid #665573!important;
  border-radius:7px!important;
  color:#e8ddef!important;
  min-height:29px!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-format-choices:not(.nomi-flat-format-colors) > button[aria-pressed="true"] {
  background:#544064!important;
  border-color:#b899cf!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-format-preview > p {
  border-radius:6px!important;
  padding:5px 7px!important;
  font-size:13px!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu #nomiChatBlockButton {
  min-height:34px!important;
  margin-top:5px!important;
  border-radius:7px!important;
  background:#35293e!important;
  border:1px solid #675475!important;
  color:#ebe1f2!important;
}
/* Calm, legible surround for the existing input row; no composer behavior changes. */
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiSendForm.nomi-flat-composer {
  background:#211a2c!important;
  border-top:1px solid #4a3b58!important;
}
html.nomi-chat-flat #nomiMessenger #nomiSendForm #nomiMessageText,
html.nomi-chat-flat #nomiMessenger #nomiSendForm.nomi-private-inline-edit-active #nomiMessageText {
  background:#2c2238!important;
  border-color:#766182!important;
  color:#f8f2ff!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu {
  background:#f3eef8!important;
  border-color:#b9a8c7!important;
  color:#33243d!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThreadMenu #nomiChatCustomizer > summary,
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-color-target > button,
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-format-choices:not(.nomi-flat-format-colors) > button {
  background:#e9e0f0!important;
  color:#37283f!important;
  border-color:#ae98bf!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-color-target > button[aria-pressed="true"],
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-format-choices:not(.nomi-flat-format-colors) > button[aria-pressed="true"] {
  background:#d6c4e5!important;
  color:#2b1937!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-chat-style-controls > label {
  color:#463453!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThread #nomiSendForm.nomi-flat-composer {
  background:#f0eaf5!important;
  border-top-color:#cfbfd9!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiSendForm #nomiMessageText {
  background:#fffaff!important;
  border-color:#ad93bb!important;
  color:#2c2036!important;
}

/* NOMI R7 compact appearance: fixed meta, rounded separated cards, five-column color letters. */
html.nomi-chat-flat #nomiMessenger{--nomi-flat-header:#241628;--nomi-flat-body:#452940;--nomi-flat-own:#293549;--nomi-flat-action-bg:#4d2b53;--nomi-flat-action-line:#926498}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages.nomi-message-list{gap:4px!important;padding:5px 6px 10px!important;background:#1c1025!important}
html.nomi-chat-flat #nomiMessenger #nomiMessages>.nomi-message,html.nomi-chat-flat #nomiMessenger #nomiMessages>.nomi-message.own{margin:0!important;padding:0!important;border:1px solid #805482!important;border-radius:9px!important;overflow:hidden!important;box-shadow:none!important}
html.nomi-chat-flat #nomiMessenger #nomiMessages>.nomi-message+.nomi-message{border-top:1px solid #805482!important}
html.nomi-chat-flat #nomiMessenger #nomiMessages>.nomi-message>.nomi-flat-meta{height:30px!important;min-height:30px!important;max-height:30px!important;flex:0 0 30px!important;box-sizing:border-box!important;padding:1px 7px!important;border-radius:8px 8px 0 0!important;background:var(--nomi-flat-header)!important;font:500 14px/1.1 system-ui,Arial,sans-serif!important;overflow:hidden!important}
html.nomi-chat-flat #nomiMessenger #nomiMessages>.nomi-message>.nomi-flat-meta .nomi-flat-author{font:700 14px/1.15 system-ui,Arial,sans-serif!important;white-space:nowrap!important;min-width:0!important;overflow:hidden!important;text-overflow:ellipsis!important}
html.nomi-chat-flat #nomiMessenger #nomiMessages>.nomi-message>.nomi-flat-meta time{font:400 11px/1.1 system-ui,Arial,sans-serif!important}
html.nomi-chat-flat #nomiMessenger #nomiMessages>.nomi-message>.nomi-message-bubble{border-radius:0 0 8px 8px!important;background:var(--nomi-flat-body)!important;padding:5px 9px!important;font-size:var(--nomi-chat-size,14px)!important}
html.nomi-chat-flat #nomiMessenger #nomiMessages>.nomi-message.own>.nomi-message-bubble{background:var(--nomi-flat-own)!important}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiSendForm.nomi-flat-composer{background:#321e37!important;border-top:1px solid #8b6091!important}
html.nomi-chat-flat #nomiMessenger #nomiSendForm #nomiMessageText{background:#44284d!important;color:#fff5ff!important;border-color:#ae7db6!important}
html.nomi-chat-flat #nomiMessenger #nomiSendForm .nomi-flat-toolbar button:not(#nomiSendButton){background:#55315d!important;border-color:#9b6eaa!important;color:#fff5ff!important}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu{top:50px!important;right:4px!important;left:auto!important;position:absolute!important;width:min(340px,calc(100vw - 12px))!important;max-height:min(74dvh,570px)!important;overflow:auto!important;background:#37203d!important;border-color:#a779af!important}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-r7-menu-head{position:sticky;top:-8px;z-index:3;display:flex;justify-content:space-between;align-items:center;padding:6px 7px;gap:8px;background:#512e57;border-radius:8px;border-bottom:1px solid #a279ac}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-r7-menu-title{font:700 14px/1.2 system-ui,Arial,sans-serif!important;color:#fff!important}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu #nomiChatMenuClose{flex:0 0 36px!important;min-width:36px!important;width:36px!important;height:36px!important;padding:0!important;margin:0!important;background:#683869!important;color:#fff!important;border:1px solid #b984c5!important;border-radius:9px!important;font:700 22px/1 system-ui,Arial,sans-serif!important}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-r7-fixed-header-label{margin:5px 0!important;padding:5px 6px!important;background:#4d2e53;color:#eedcf4;border-radius:7px;font:500 12px/1.25 system-ui,Arial,sans-serif}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-color-target{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:6px!important}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-color-target>button{width:100%!important;min-width:0!important;min-height:38px!important;height:auto!important;white-space:normal!important;background:#57335e!important;color:#fff!important;font:600 12px/1.15 system-ui,Arial,sans-serif!important;border:1px solid #a475ad!important}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-color-target>button[aria-pressed="true"]{background:#862fa0!important;border-color:#f0b1f5!important}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-format-choices.nomi-flat-format-colors{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:6px!important}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-format-choices.nomi-flat-format-colors>button{flex:initial!important;display:flex!important;justify-content:center!important;align-items:center!important;box-sizing:border-box!important;width:100%!important;min-width:0!important;height:35px!important;min-height:35px!important;padding:0!important;border:1px solid #b691be!important;border-radius:8px!important;background:var(--swatch,#54325c)!important;color:var(--swatch-ink,#fff)!important;font:750 17px/1 system-ui,Arial,sans-serif!important}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-format-choices.nomi-flat-format-colors>button:first-child{background:#55345d!important;color:#fff!important}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-format-choices.nomi-flat-format-colors>button[aria-pressed="true"]{outline:2px solid #f3cdff!important;outline-offset:-3px!important}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger{--nomi-flat-header:#e6d9ee;--nomi-flat-body:#fff8ff;--nomi-flat-own:#e5e9f8}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu{background:#f3e9f7!important}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-r7-menu-head{background:#e4d3e9}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-r7-menu-title,html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-r7-fixed-header-label{color:#372446!important}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThreadMenu #nomiChatMenuClose{color:#392043!important;background:#e0c8e7!important}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThread #nomiSendForm.nomi-flat-composer{background:#f1e6f5!important}

/* NOMI R9: override the older 3-ID palette rule that concealed the new swatches. */
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu #nomiChatCustomizer .nomi-flat-format-colors > button {
  display:flex!important;align-items:center!important;justify-content:center!important;
  width:100%!important;min-width:0!important;height:35px!important;min-height:35px!important;
  padding:0!important;margin:0!important;box-sizing:border-box!important;
  background:var(--swatch,#583661)!important;color:var(--swatch-ink,#fff)!important;
  font:750 17px/1 system-ui,Arial,sans-serif!important;text-shadow:none!important;
  border:1px solid #b88ebc!important;border-radius:8px!important;box-shadow:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu #nomiChatCustomizer .nomi-flat-format-colors > button:first-child {
  background:#594060!important;color:#fff!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu #nomiChatCustomizer .nomi-flat-format-colors > button[aria-pressed="true"] {
  outline:2px solid #ffd8ff!important;outline-offset:-3px!important;
  border-color:#ffe5ff!important;
}
/* Fixed 14px name+controls on ALL messages even when body text is 12...32px. */
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages > .nomi-message > .nomi-flat-meta {
  box-sizing:border-box!important;height:30px!important;min-height:30px!important;max-height:30px!important;
  flex:0 0 30px!important;font:500 14px/1.1 system-ui,Arial,sans-serif!important;
  padding:1px 7px!important;white-space:nowrap!important;overflow:hidden!important;
  border-radius:8px 8px 0 0!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages > .nomi-message > .nomi-flat-meta .nomi-flat-author {
  font:700 14px/1.15 system-ui,Arial,sans-serif!important;
  white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages.nomi-message-list {
  gap:4px!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages > .nomi-message,
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages > .nomi-message.own {
  border:1px solid #805482!important;border-radius:9px!important;overflow:hidden!important;
  margin:0!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages > .nomi-message + .nomi-message,
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages > .nomi-message + .nomi-message.own {
  border-top:1px solid #805482!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages > .nomi-message > .nomi-message-bubble,
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages > .nomi-message.own > .nomi-message-bubble {
  border-radius:0 0 8px 8px!important;
}
/* Keep the X above the scrolling settings content for both themes. */
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu .nomi-r7-menu-head {
  position:sticky!important;top:-8px!important;z-index:20!important;
}


/* R10 — approved private chat styling only; original message controls remain. */
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger{--nomi-flat-header:#1b1139;--nomi-flat-body:#ebc6f0;--nomi-flat-own:#b5cafa;--nomi-flat-line:#7956bc}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger #nomiThread:not([hidden]){background:#120d2d!important}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger #nomiThread .nomi-thread-header{background:linear-gradient(110deg,#2b1450,#121232 58%,#271244)!important;border-bottom:1px solid #a279e5!important;color:#f7efff!important}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages.nomi-message-list{background:linear-gradient(145deg,#140b2a,#1c0c32)!important;gap:4px!important;padding:5px!important}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages > .nomi-message,html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages > .nomi-message.own{border:1px solid #815db1!important;border-radius:10px!important;box-shadow:0 2px 8px #07041466!important;overflow:hidden!important}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages > .nomi-message > .nomi-flat-meta{height:30px!important;min-height:30px!important;max-height:30px!important;background:linear-gradient(105deg,#2a164e,#16102e 70%,#271342)!important;border-bottom:1px solid #9c70d4!important;color:#f9eeff!important;font:500 14px/1.15 system-ui,Arial,sans-serif!important}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages > .nomi-message > .nomi-flat-meta .nomi-flat-author{font:700 14px/1.15 system-ui,Arial,sans-serif!important;color:#ffe8fa!important}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages > .nomi-message.own > .nomi-flat-meta .nomi-flat-author{color:#bce7ff!important}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages > .nomi-message > .nomi-message-bubble{font:var(--nomi-chat-weight,400) var(--nomi-chat-size,16px)/1.42 var(--nomi-chat-font,Arial,sans-serif)!important;letter-spacing:normal!important;word-spacing:normal!important;padding:8px 11px 26px!important;text-shadow:none!important;border-radius:0 0 9px 9px!important}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages > .nomi-message:not(.own) > .nomi-message-bubble{background:var(--nomi-flat-body,#ebc6f0)!important;color:var(--nomi-chat-text-incoming,#351940)!important}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages > .nomi-message.own > .nomi-message-bubble{background:var(--nomi-flat-own,#b5cafa)!important;color:var(--nomi-chat-text-own,#1c3154)!important}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages > .nomi-message > .nomi-message-bubble > p{font:inherit!important;line-height:inherit!important;color:inherit!important;letter-spacing:normal!important;word-spacing:normal!important}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger #nomiThread #nomiSendForm.nomi-flat-composer{background:linear-gradient(105deg,#271242,#14132f 60%,#261345)!important;border-top:1px solid #7b4cab!important}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger #nomiSendForm #nomiMessageText{background:#291947!important;color:#fff!important;border:1px solid #a277e2!important;box-shadow:inset 0 1px 6px #07021680!important}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger #nomiSendForm #nomiSendButton{background:linear-gradient(135deg,#b72ee4,#6d28c0)!important;border-color:#d9aaff!important;color:#fff!important}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu{background:linear-gradient(150deg,#241541,#2a1749)!important;border:1px solid #9369ca!important;color:#fff!important}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-r7-menu-head{background:linear-gradient(100deg,#301a57,#26143a)!important}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu #nomiChatCustomizer .nomi-chat-style-controls > label:has(#nomiChatColor){display:flex!important;flex-direction:column!important;gap:5px!important}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu #nomiChatCustomizer #nomiChatColor{display:block!important;width:100%!important;background:#30214e!important;color:#fff!important;border:1px solid #9b74cb!important;border-radius:9px!important;padding:7px!important}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu #nomiChatPresetPalette{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;margin:6px 0 11px!important}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu #nomiChatPresetPalette button{display:flex!important;align-items:flex-end!important;min-width:0!important;min-height:56px!important;padding:7px!important;background:linear-gradient(145deg,var(--preset-top),var(--preset-bottom))!important;color:var(--preset-ink,#281335)!important;border:1px solid #a17bcd!important;border-radius:10px!important;font:700 12px/1.25 system-ui,Arial,sans-serif!important}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu #nomiChatPresetPalette button[aria-pressed="true"]{outline:2px solid #ffd3ff!important;outline-offset:1px!important}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu #nomiChatCustomizer .nomi-flat-format-colors{display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;gap:7px!important;margin:9px 0!important}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu #nomiChatCustomizer .nomi-flat-format-colors > button{display:grid!important;place-items:center!important;min-width:0!important;width:100%!important;height:44px!important;min-height:44px!important;background:var(--swatch,#58356f)!important;color:var(--swatch-ink,#fff)!important;font:750 20px/1 system-ui,Arial,sans-serif!important;text-shadow:none!important;border:1px solid #a17dbe!important;border-radius:9px!important}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu #nomiChatCustomizer .nomi-flat-format-colors > button[aria-pressed="true"]{outline:2px solid #ffd4ff!important;outline-offset:1px!important}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu .nomi-flat-color-target > button{min-height:43px!important;height:auto!important;background:#3c235c!important;color:#fff!important;border-color:#aa7ac7!important;font:700 13px/1.2 system-ui,Arial,sans-serif!important}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu .nomi-flat-format-preview > p{font:600 14px/1.35 system-ui,Arial,sans-serif!important;border-radius:8px!important;padding:8px!important}

/* R11 — the midnight preset uses the site's dark ink colors in private chat. */
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages > .nomi-message > .nomi-flat-meta time {
  font:400 14px/1.15 system-ui,Arial,sans-serif!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu:has(> .nomi-r7-menu-head) #nomiChatCustomizer > summary,
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu #nomiChatCustomizer .nomi-flat-format-colors > button[hidden] {
  display:none!important;
}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] {
  --nomi-flat-header:#0e101d;
  --nomi-flat-line:#414968;
  --nomi-flat-action-bg:#1a2034;
  --nomi-flat-action-line:#414968;
  --nomi-flat-action:#e7edff;
  --nomi-flat-icon:#aebedb;
}
html[data-nomi-theme="dark"].nomi-chat-flat:has(#nomiMessenger[data-theme="midnight"]:not([hidden]) #nomiThread:not([hidden])) .topbar {
  background:#1a1b31!important;
}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread:not([hidden]),
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread #nomiMessages.nomi-message-list {
  background:#151629!important;
}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread .nomi-thread-header,
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread #nomiSendForm.nomi-flat-composer {
  background:#1a1b31!important;
  border-color:var(--nomi-flat-line)!important;
}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread .nomi-thread-header :is(button,.nomi-outline),
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread #nomiSendForm .nomi-flat-toolbar button:not(#nomiSendButton),
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread #nomiSendForm #nomiMessageText {
  background:#20263c!important;
  border-color:var(--nomi-flat-line)!important;
  color:#edf2ff!important;
  box-shadow:none!important;
}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread #nomiSendForm #nomiSendButton {
  background:#485a9e!important;
  border-color:#8193d7!important;
}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread #nomiMessages > .nomi-message {
  border-color:var(--nomi-flat-line)!important;
  box-shadow:none!important;
}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread #nomiMessages > .nomi-message > .nomi-flat-meta {
  background:var(--nomi-flat-header)!important;
  color:#e7edff!important;
  border-bottom-color:#242a3e!important;
}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread #nomiMessages > .nomi-message > .nomi-flat-meta :is(.nomi-flat-author,time) {
  color:#d7e7ff!important;
}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread #nomiMessages > .nomi-message > .nomi-message-bubble {
  padding:6px 10px 18px!important;
}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread #nomiThreadMenu {
  width:min(390px,calc(100vw - 12px))!important;
  background:#171c30!important;
  border-color:var(--nomi-flat-line)!important;
}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread #nomiThreadMenu .nomi-r7-menu-head {
  background:#171c30!important;
  border-color:var(--nomi-flat-line);
}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread #nomiThreadMenu #nomiChatMenuClose {
  flex:0 0 44px!important;
  width:44px!important;
  height:44px!important;
  background:#171c30!important;
  border-color:transparent!important;
  font:600 25px/1 system-ui,sans-serif!important;
}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread #nomiThreadMenu :is(.nomi-r7-fixed-header-label,.nomi-flat-color-target > button,.nomi-flat-format-choices:not(.nomi-flat-format-colors) > button,#nomiChatColor,#nomiChatBlockButton) {
  background:#21273d!important;
  border-color:var(--nomi-flat-line)!important;
  color:#e7edff!important;
}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread #nomiThreadMenu :is(.nomi-flat-color-target,.nomi-flat-format-choices:not(.nomi-flat-format-colors)) > button[aria-pressed="true"] {
  background:#485a9e!important;
  border-color:#a6b4ee!important;
  outline-color:#a6b4ee!important;
}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread #nomiThreadMenu #nomiChatCustomizer .nomi-flat-format-colors {
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
  gap:5px!important;
}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread #nomiThreadMenu #nomiChatCustomizer .nomi-flat-format-colors > button {
  background:var(--swatch,#1c2237)!important;
  color:var(--swatch-ink,#e7edff)!important;
  border-color:var(--nomi-flat-line)!important;
}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread #nomiThreadMenu #nomiChatCustomizer .nomi-flat-format-colors > button:first-child {
  grid-column:1/-1;
  height:30px!important;
  min-height:30px!important;
  font-size:13px!important;
}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread #nomiThreadMenu #nomiChatCustomizer .nomi-flat-format-colors > button[aria-pressed="true"] {
  outline-color:#a6b4ee!important;
  outline-offset:-2px!important;
}

/* NOMI LIVE R12 compact chat overlay */
/* NOMI all-site compact chat standard, 2026-11-07.
   Keep the original ⋮ in its DARK top row; move only reply/reaction/receipt
   into the message's bottom edge. No colored boxes or extra toolbar. */
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-bubble,
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message.own .nomi-message-bubble {
  min-height:0!important;
  padding:3px 6px 2px!important;
  line-height:1.17!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-bubble > p {
  margin:0!important;
  padding:0!important;
  line-height:1.17!important;
  white-space:pre-wrap;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-meta {
  min-height:20px!important;
  padding:1px 5px!important;
  line-height:1.15!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-flat-meta .nomi-flat-menu {
  margin-left:auto!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-bubble > .nomi-chat-bottom-controls {
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:3px!important;
  min-height:20px!important;
  margin:1px 0 0!important;
  padding:0 0 0 4px!important;
  border:0!important;
  background:none!important;
  box-shadow:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-chat-bottom-controls > .nomi-flat-reply {
  display:inline-flex!important;
  flex:0 0 27px!important;
  width:27px!important;
  min-width:27px!important;
  height:24px!important;
  min-height:24px!important;
  font-size:15px!important;
  padding:0!important;
  line-height:1!important;
  background:none!important;
  border:0!important;
  box-shadow:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-chat-bottom-controls > .nomi-chat-reactions {
  display:inline-flex!important;
  align-items:center!important;
  flex:0 0 auto!important;
  gap:0!important;
  padding:0!important;
  margin:0!important;
  background:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-chat-bottom-controls
  .nomi-chat-reactions > .nomi-chat-reaction-picker {
  display:inline-flex!important;
  justify-content:center!important;
  align-items:center!important;
  min-width:28px!important;
  width:28px!important;
  max-width:28px!important;
  min-height:24px!important;
  height:24px!important;
  max-height:24px!important;
  margin:0!important;
  padding:0!important;
  flex:0 0 28px!important;
  border:0!important;
  border-radius:0!important;
  background:none!important;
  box-shadow:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-chat-bottom-controls
  .nomi-chat-reaction-picker > summary {
  display:inline-flex!important;
  justify-content:center!important;
  align-items:center!important;
  font-size:15px!important;
  line-height:1!important;
  width:28px!important;
  min-width:28px!important;
  max-width:28px!important;
  min-height:24px!important;
  height:24px!important;
  max-height:24px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  list-style:none!important;
  color:#d7c6e4!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-chat-bottom-controls
  .nomi-chat-reaction-picker > summary::-webkit-details-marker {display:none!important;}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-chat-bottom-controls
  .nomi-chat-reactions > .nomi-chat-reaction-chip {display:none!important;}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-chat-bottom-controls[hidden] {display:none!important;}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-chat-bottom-controls > .nomi-flat-receipt {
  display:inline-flex!important;
  position:static!important;
  inset:auto!important;
  height:24px!important;
  min-height:24px!important;
  flex:0 0 auto!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0 0 0 1px!important;
  padding:0!important;
  line-height:1!important;
  pointer-events:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-chat-bottom-controls .nomi-receipt {
  font-size:14px!important;
  line-height:1!important;
}
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-bubble > blockquote,
html.nomi-chat-flat #nomiMessenger #nomiMessages .nomi-message-bubble > .nomi-chat-quote {
  margin-bottom:2px!important;
  padding:3px 5px!important;
  line-height:1.2!important;
}
/* The same compact line rhythm for existing community game chat and future
   reusable game/group chat message components; no post/feed styling changed. */
#nomiCommunities .nmc-room-message {padding-block:3px!important;}
#nomiCommunities .nmc-room-message-line {gap:4px!important;margin-top:1px!important;}
#nomiCommunities .nmc-room-message-line p {margin:0!important;line-height:1.18!important;}
#nomiCommunities .nmc-room-quote {margin:3px 0!important;padding:4px!important;line-height:1.18!important;}
html[data-nomi-theme] #nomiCommunities .nmc-room-message-line button.nmc-room-tiny-reply {
  font-size:14px!important;
  width:25px!important;min-width:25px!important;max-width:25px!important;
  height:25px!important;min-height:25px!important;max-height:25px!important;
  box-shadow:none!important;border:0!important;background:transparent!important;
}
:is(.nomi-game-chat-message,.nomi-group-chat-message,.nomi-community-chat-message) p {
  line-height:1.18!important;
  margin-block:2px!important;
}
/* Existing and future community game chats share the same small, unboxed
   bottom controls. Status checks are rendered only where supported. */
#nomiCommunities .nmc-room-message-main > .nmc-room-bottom-controls {
  display:flex!important;align-items:center!important;justify-content:flex-end!important;
  gap:4px!important;min-height:23px!important;margin:1px 0 0!important;
  padding:0!important;border:0!important;background:none!important;box-shadow:none!important;
}
#nomiCommunities .nmc-room-bottom-controls .nmc-game-reaction-bar {
  display:inline-flex!important;align-items:center!important;justify-content:flex-end!important;
  gap:3px!important;margin:0!important;padding:0!important;border:0!important;background:none!important;
}
#nomiCommunities .nmc-room-bottom-controls .nmc-game-reaction-bar > button {
  font-size:14px!important;line-height:1!important;
  min-width:25px!important;min-height:23px!important;
  padding:0 3px!important;margin:0!important;
  border:0!important;border-radius:0!important;
  background:transparent!important;box-shadow:none!important;
}
#nomiCommunities .nmc-room-bottom-controls .nmc-room-tiny-reply {
  font-size:14px!important;background:transparent!important;box-shadow:none!important;
}
#nomiCommunities .nmc-room-message-author > .nmc-game-message-menu{margin-left:auto!important;flex:0 0 auto!important;}
#nomiCommunities .nmc-room-message-author > .nmc-game-message-menu > summary{width:25px!important;min-width:25px!important;height:25px!important;min-height:25px!important;padding:0!important;background:transparent!important;border:0!important;box-shadow:none!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;}
#nomiCommunities .nmc-room-message-main > .nmc-room-bottom-controls [data-room-action="reply"],
#nomiCommunities .nmc-room-message-main > .nmc-room-bottom-controls [data-gchat="picker"]{width:26px!important;min-width:26px!important;height:25px!important;min-height:25px!important;padding:0!important;margin:0!important;box-shadow:none!important;background:transparent!important;border:0!important;font-size:15px!important;line-height:1!important;cursor:pointer;}
#nomiCommunities .nmc-room-message-main > .nmc-room-bottom-controls [data-gchat="picker"]{font-size:18px!important;}
#nomiCommunities .nmc-room-message-main > .nmc-room-bottom-controls{gap:3px!important;}


/* NOMI R12: additive, fail-closed override only after overlay.js passes its DOM guard.
   Rules do not change games, group chats, backend, or older aliases. */
html.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages.nomi-message-list {
  order:1!important;
  flex:1 1 auto!important;min-height:0!important;height:auto!important;
  max-height:none!important;overflow-y:auto!important;overflow-x:hidden!important;
  padding:2px 2px 0!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiThread
  :is(#nomiChatActions,#nomiReplyPreview,#nomiEmojiPanel,#nomiAttachPreview) {
  order:5!important;flex:0 0 auto!important;max-height:30dvh;overflow-y:auto;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiChatStatus {
  order:7!important;min-height:0!important;margin:0!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiChatStatus:empty {
  display:none!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiSendForm.nomi-flat-composer {
  order:9!important;display:grid!important;
  box-sizing:border-box!important; /* width includes both sides: mic stays inside viewport */
  grid-template-columns:minmax(0,1fr) 41px!important;
  width:100%!important;flex:0 0 auto!important;
  align-items:end!important;gap:7px!important;
  padding:3px 5px max(5px,env(safe-area-inset-bottom))!important;
  margin:0!important;background:#172134!important;
  border:0!important;border-top:1px solid #465675!important;
  border-radius:0!important;box-shadow:none!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiSendForm .nomi-flat-editor {
  position:relative!important;display:block!important;
  grid-column:1!important;grid-row:1!important;
  width:100%!important;min-width:0!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiSendForm .nomi-flat-editor #nomiMessageText,
html.nomi-chat-r12-bottom #nomiMessenger #nomiSendForm.nomi-private-inline-edit-active #nomiMessageText {
  box-sizing:border-box!important;width:100%!important;min-width:0!important;
  min-height:40px!important;max-height:128px!important;
  padding:8px 44px 7px 43px!important;
  border:1px solid #647aa5!important;border-radius:11px!important;
  color:#f8faff!important;background:#1e2b44!important;
  font:400 16px/1.4 system-ui,Arial,sans-serif!important;
  overflow-x:hidden!important;overflow-y:auto!important;
  resize:none!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiSendForm .nomi-flat-editor #nomiAttachToggle,
html.nomi-chat-r12-bottom #nomiMessenger #nomiSendForm .nomi-flat-editor #nomiSendButton {
  position:absolute!important;z-index:2;
  top:auto!important;bottom:4px!important;
  display:inline-flex!important;align-items:center;justify-content:center;
  width:32px!important;min-width:32px!important;
  height:32px!important;min-height:32px!important;
  padding:0!important;margin:0!important;
  border-radius:9px!important;touch-action:manipulation;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiSendForm .nomi-flat-editor #nomiAttachToggle {
  left:4px!important;right:auto!important;
  font:400 25px/1 system-ui,Arial,sans-serif!important;
  background:#293b5a!important;color:#eaf1ff!important;border:1px solid #667ba5!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiSendForm .nomi-flat-editor #nomiSendButton {
  right:4px!important;left:auto!important;
  color:#fff!important;font-size:19px!important;
  background:linear-gradient(125deg,#3456a1,#7049af)!important;
  border:1px solid #8d9fdc!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiSendForm .nomi-flat-toolbar {
  display:flex!important;align-items:flex-end!important;justify-content:center!important;
  grid-column:2!important;grid-row:1!important;
  width:41px!important;min-width:41px!important;max-width:41px!important;
  height:40px!important;min-height:40px!important;
  padding:0 0 2px!important;margin:0!important;
  border:0!important;background:transparent!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiSendForm .nomi-flat-toolbar #nomiVoiceToggle {
  display:inline-flex!important;align-items:center;justify-content:center;
  width:37px!important;min-width:37px!important;height:37px!important;min-height:37px!important;
  margin:0!important;font-size:21px!important;
  border:1px solid #6981a9!important;border-radius:11px!important;
  background:#293b58!important;color:#eaf4ff!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiSendForm .nomi-flat-toolbar :is(#nomiEmojiToggle,#nomiFlatFileToggle),
html.nomi-chat-r12-bottom #nomiMessenger #nomiSendForm .nomi-r12-hidden-legacy-file {
  display:none!important;
}
/* Keep the editor in the ORIGINAL textarea, including on active edit. */
html.nomi-chat-r12-bottom #nomiMessenger #nomiSendForm.nomi-private-inline-edit-active {
  grid-template-columns:minmax(0,1fr)!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiSendForm.nomi-private-inline-edit-active .nomi-flat-toolbar,
html.nomi-chat-r12-bottom #nomiMessenger #nomiSendForm.nomi-private-inline-edit-active #nomiAttachToggle {
  display:none!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiSendForm.nomi-private-inline-edit-active
  .nomi-private-inline-edit-field {
  position:relative!important;display:block!important;width:100%!important;min-width:0!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiSendForm.nomi-private-inline-edit-active #nomiMessageText {
  padding:8px 81px 7px 10px!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiSendForm.nomi-private-inline-edit-active
  .nomi-private-inline-edit-cancel {
  position:absolute!important;right:42px!important;top:5px!important;
  height:28px!important;width:28px!important;min-height:28px!important;min-width:28px!important;
  background:transparent!important;border:0!important;box-shadow:none!important;
}
/* Font increases change text lines, not the blank padding of cards. */
html.nomi-chat-r12-bottom #nomiMessenger #nomiMessages .nomi-message,
html.nomi-chat-r12-bottom #nomiMessenger #nomiMessages .nomi-message.own {
  min-height:0!important;height:auto!important;
  max-height:none!important;margin:0!important;padding:0!important;row-gap:0!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiMessages .nomi-message-bubble,
html.nomi-chat-r12-bottom #nomiMessenger #nomiMessages .nomi-message.own .nomi-message-bubble {
  min-height:0!important;height:auto!important;
  max-height:none!important;padding:2px 5px!important;
  line-height:1.16!important;overflow-wrap:anywhere!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiMessages .nomi-message-bubble > p {
  margin:0!important;padding:0!important;line-height:1.16!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiMessages :is(.nomi-flat-menu,.nomi-flat-reply) {
  min-height:22px!important;height:22px!important;
  min-width:22px!important;width:22px!important;
  margin:0!important;padding:0 2px!important;
  background:transparent!important;border:0!important;
  font-size:16px!important;box-shadow:none!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiMessages .nomi-message-media-tray {
  width:fit-content!important;max-width:min(100%,205px)!important;
  align-self:flex-start!important;flex-wrap:nowrap!important;
  overflow-x:auto!important;overflow-y:hidden!important;
  padding:0!important;margin:1px 0 0!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiMessages .nomi-message.own .nomi-message-media-tray {
  align-self:flex-end!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiMessages
  .nomi-message-media-tray .nomi-chat-media-image {
  display:block!important;flex:0 0 92px!important;
  width:92px!important;max-width:92px!important;min-width:92px!important;
  height:76px!important;max-height:76px!important;min-height:76px!important;
  overflow:hidden!important;border-radius:7px!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiMessages
  .nomi-message-media-tray .nomi-chat-media-image img {
  display:block!important;width:100%!important;height:100%!important;
  max-height:none!important;max-width:none!important;object-fit:cover!important;
  cursor:zoom-in;
}
/* Do not alter audio/video src or DOM nodes; playback survives message refresh. */
html.nomi-chat-r12-bottom #nomiMessenger #nomiMessages .nomi-chat-media video {
  max-height:140px!important;max-width:200px!important;
}
html.nomi-chat-r12-bottom #nomiMessenger #nomiMessages .nomi-chat-media audio {
  max-width:min(205px,60vw)!important;
}
/* A body portal, anchored to the visual viewport: menus cannot be clipped. */
html.nomi-chat-r12-bottom body > .nomi-r12-attachment-menu[hidden],
html.nomi-chat-r12-bottom body > .nomi-flat-attachment-menu[hidden]{display:none!important}
html.nomi-chat-r12-bottom body > .nomi-flat-attachment-menu,
html.nomi-chat-r12-bottom body > .nomi-r12-attachment-menu {
  position:fixed;z-index:2147483001;
  box-sizing:border-box;display:grid!important;grid-template-columns:1fr;gap:3px;
  width:min(208px,calc(100vw - 16px));max-height:min(44dvh,190px);
  overflow:auto;padding:5px;
  border:1px solid #7792bd;border-radius:11px;
  background:#172941;box-shadow:0 10px 28px #0009;
}
html.nomi-chat-r12-bottom body > .nomi-flat-attachment-menu button,
html.nomi-chat-r12-bottom body > .nomi-r12-attachment-menu button {
  width:100%!important;min-height:37px!important;
  margin:0!important;padding:7px 10px!important;
  color:#eaf2ff;background:#253c5c;
  border:1px solid #47638f;border-radius:7px;
  font:600 13px/1.25 system-ui,Arial,sans-serif;text-align:left;cursor:pointer;
}
html[data-nomi-theme="light"].nomi-chat-r12-bottom #nomiMessenger #nomiSendForm.nomi-flat-composer {
  background:#eef3fa!important;border-color:#bdc8d9!important;
}
html[data-nomi-theme="light"].nomi-chat-r12-bottom #nomiMessenger #nomiSendForm #nomiMessageText {
  background:#fff!important;color:#1a2a41!important;border-color:#899cbb!important;
}
@media(max-width:380px) {
  html.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiSendForm.nomi-flat-composer {
    grid-template-columns:minmax(0,1fr) 36px!important;gap:5px!important;padding-inline:3px!important;
  }
  html.nomi-chat-r12-bottom #nomiMessenger #nomiSendForm .nomi-flat-toolbar {
    width:36px!important;min-width:36px!important;
  }
  html.nomi-chat-r12-bottom #nomiMessenger #nomiSendForm .nomi-flat-toolbar #nomiVoiceToggle {
    width:34px!important;min-width:34px!important;
  }
}



/* Private chat: align its existing controls with the last line or attachment. */
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages {
  gap:5px!important;
  padding-block-end:max(8px, env(safe-area-inset-bottom))!important;
  overflow-x:hidden!important;
  overscroll-behavior-y:contain;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages > .nomi-message[data-nomi-flat-ready] {
  box-sizing:border-box!important;
  width:97%!important;
  max-width:min(97%,880px)!important;
  min-width:0!important;
  border-radius:9px!important;
  border-color:#151c2c!important;
  box-shadow:none!important;
  overflow:visible!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages > .nomi-message[data-nomi-flat-ready] > .nomi-flat-meta {
  background:var(--nomi-private-heading,#101a2c)!important;
  color:var(--nomi-private-heading-ink,#eaf3ff)!important;
  height:25px!important;
  min-height:25px!important;
  max-height:25px!important;
  flex:0 0 25px!important;
  border-bottom:1px solid var(--nomi-private-divider,#151d2d)!important;
}
html[data-nomi-theme="light"] #nomiMessenger {
  --nomi-private-heading:#e2ebf7;
  --nomi-private-heading-ink:#172c47;
  --nomi-private-time-ink:#4b5e76;
  --nomi-private-divider:#71809a;
  --nomi-private-link:#164e94;
  --nomi-private-quote-bg:#dce7f4;
  --nomi-private-quote-ink:#243950;
  --nomi-private-quote-line:#7890ad;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages > .nomi-message[data-nomi-flat-ready] > .nomi-flat-meta :is(.nomi-flat-author,time,.nomi-flat-menu) {
  color:inherit!important;
  text-shadow:none!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages > .nomi-message[data-nomi-flat-ready] > .nomi-flat-meta > time {
  flex:0 0 auto!important;
  margin:0 0 0 auto!important;
  color:var(--nomi-private-time-ink,#a5b2c8)!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages > .nomi-message[data-nomi-flat-ready] > .nomi-flat-meta > .nomi-flat-menu {
  margin:0!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-message-bubble > :is(blockquote,.nomi-chat-quote),
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiReplyPreview:not([hidden]) {
  background:var(--nomi-private-quote-bg,#29384d)!important;
  color:var(--nomi-private-quote-ink,#e1eaf7)!important;
  border-inline-start:2px solid var(--nomi-private-quote-line,#526d91)!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages > .nomi-message[data-nomi-flat-ready] > .nomi-message-bubble {
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  column-gap:5px!important;
  row-gap:0!important;
  box-sizing:border-box!important;
  padding:4px 6px!important;
  min-height:26px!important;
  width:100%!important;
  max-width:100%!important;
  overflow:visible!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-message-bubble > :is(.nomi-chat-quote,blockquote,.nomi-message-media-tray,.nomi-chat-post-link) {
  grid-column:1 / -1;
  min-width:0!important;
  max-width:100%!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-message-bubble > p {
  grid-column:1;
  grid-row:4;
  align-self:end;
  min-width:0!important;
  max-width:100%!important;
  margin:0!important;
  line-height:1.35!important;
  overflow-wrap:anywhere!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-message-bubble > [hidden] {
  display:none!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-message-bubble.nomi-media-only > .nomi-message-media-tray {
  grid-column:1;
  grid-row:4;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-message-bubble > .nomi-chat-bottom-controls:not([hidden]) {
  grid-column:2;
  grid-row:4;
  align-self:end;
  display:flex!important;
  flex-wrap:nowrap!important;
  align-items:center!important;
  position:static!important;
  width:max-content!important;
  min-height:24px!important;
  height:24px!important;
  padding:0!important;
  margin:0!important;
  gap:2px!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-message[data-nomi-flat-ready] > :is(.nomi-message-tools,.nomi-message-meta,.nomi-message-quick-actions,.nomi-chat-reactions) {
  display:none!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-chat-bottom-controls :is(.nomi-flat-reply,.nomi-chat-reaction-picker,summary) {
  box-sizing:border-box!important;
  position:static!important;
  width:23px!important;
  min-width:23px!important;
  max-width:23px!important;
  height:24px!important;
  min-height:24px!important;
  max-height:24px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  color:inherit!important;
  background:transparent!important;
  box-shadow:none!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-flat-reply svg {
  width:18px;
  height:18px;
  stroke:currentColor;
  stroke-width:1.65;
  stroke-linecap:round;
  stroke-linejoin:round;
  fill:none;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-chat-bottom-controls .nomi-flat-receipt {
  position:static!important;
  align-self:center!important;
  min-width:21px!important;
  margin:0 1px!important;
  padding:0!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-message-bubble p a {
  color:var(--nomi-private-link,#86ccff)!important;
  text-decoration:underline;
  text-underline-offset:2px;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-message-media-tray {
  justify-self:start;
  max-width:100%!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-message-media-tray .nomi-chat-media-image {
  flex:0 0 62px!important;
  width:62px!important;
  min-width:62px!important;
  max-width:62px!important;
  height:55px!important;
  min-height:55px!important;
  max-height:55px!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-chat-media-audio audio {
  display:block!important;
  width:min(210px,52vw)!important;
  height:32px!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiSendForm .nomi-flat-editor #nomiSendButton,
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiSendForm .nomi-flat-toolbar #nomiVoiceToggle:not(.is-recording) {
  background:transparent!important;
  box-shadow:none!important;
  border-color:transparent!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiChatStatus:not(:empty) {
  position:absolute!important;
  inset:52px 8px auto!important;
  z-index:5;
  width:fit-content;
  max-width:calc(100% - 16px);
  padding:4px 8px!important;
  border-radius:6px;
  background:var(--nomi-private-heading,#101a2c);
  color:var(--nomi-private-heading-ink,#eaf3ff);
  pointer-events:none;
}
/* Private chat appearance uses the same tokens in the thread and its samples. */
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages > .nomi-message > .nomi-message-bubble,
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-format-preview > p {
  --message-bg:var(--nomi-flat-body);
  --message-text:var(--nomi-chat-text-incoming);
  --message-ink:var(--nomi-chat-ink-incoming);
  background:var(--message-bg)!important;
  color:var(--message-text)!important;
  font-family:var(--nomi-chat-font,Arial),sans-serif!important;
  font-size:var(--nomi-chat-size,16px)!important;
  font-weight:var(--nomi-chat-weight,400)!important;
  box-shadow:inset 0 0 0 var(--nomi-chat-border-width,0px) var(--nomi-chat-border-color,transparent)!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages > .nomi-message.own > .nomi-message-bubble,
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-flat-format-preview > p:first-child {
  --message-bg:var(--nomi-flat-own);
  --message-text:var(--nomi-chat-text-own);
  --message-ink:var(--nomi-chat-ink-own);
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-message-bubble > p {
  color:inherit!important;
  font:inherit!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-message-bubble p a,
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-message-bubble .nomi-chat-bottom-controls {
  color:var(--message-ink)!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-message-bubble .nomi-flat-receipt {
  color:var(--message-ink)!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-message-bubble .nomi-receipt:is(.sent,.delivered) {
  color:#aaa!important;
  color:color-mix(in srgb,var(--message-ink,#fff) 80%,#858585)!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-message-bubble .nomi-receipt.read {
  color:#38bdf8!important;
  color:color-mix(in srgb,#008cff 65%,var(--message-ink,#fff))!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-message-bubble > :is(blockquote,.nomi-chat-quote),
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiReplyPreview:not([hidden]) {
  background:var(--nomi-chat-quote-bg,#29384d)!important;
  color:var(--nomi-chat-quote-text,#e1eaf7)!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages > .nomi-message > .nomi-flat-meta {
  --nomi-private-heading:#101a2c;
  --nomi-private-heading-ink:#eaf3ff;
  --nomi-private-time-ink:#acbad0;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu {
  --chat-choice-bg:#20324d;
  --chat-choice-ink:#edf4ff;
  --chat-choice-line:#5c759a;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThreadMenu {
  --chat-choice-bg:#e6eefb;
  --chat-choice-ink:#162c4d;
  --chat-choice-line:#849cbd;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu #nomiChatCustomizer .nomi-chat-style-controls {
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu #nomiChatCustomizer .nomi-chat-background-controls {
  grid-column:1/-1;
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu #nomiChatCustomizer :is(label,select)[hidden] {
  display:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu #nomiChatCustomizer .nomi-chat-picker {
  min-width:0;
  color:var(--chat-choice-ink);
  margin:0;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu #nomiChatCustomizer .nomi-chat-picker > summary {
  min-height:42px;
  box-sizing:border-box;
  display:grid;
  gap:3px;
  padding:6px 23px 6px 8px;
  position:relative;
  border:1px solid var(--chat-choice-line);
  border-radius:7px;
  background:var(--chat-choice-bg);
  font:500 12px/1.25 system-ui,sans-serif;
  list-style:none;
  cursor:pointer;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu #nomiChatCustomizer .nomi-chat-picker > summary::-webkit-details-marker {display:none}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu #nomiChatCustomizer .nomi-chat-picker > summary::after {
  content:'▾';position:absolute;right:7px;top:50%;transform:translateY(-50%);
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu #nomiChatCustomizer .nomi-chat-picker-options {
  display:grid;
  gap:3px;
  margin:4px 0;
  padding:3px;
  max-height:min(34dvh,250px);
  overflow:auto;
  overscroll-behavior:contain;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu #nomiChatCustomizer .nomi-chat-picker-options > button {
  display:flex!important;
  align-items:center;
  gap:6px;
  min-width:0!important;
  padding:5px!important;
  text-align:start;
  background:var(--chat-choice-bg)!important;
  color:var(--chat-choice-ink)!important;
  border-color:var(--chat-choice-line)!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu #nomiChatCustomizer .nomi-chat-picker-options > button::before {
  content:'';
  flex:0 0 13px;
  height:13px;
  background:var(--choice-color);
  border:1px solid var(--chat-choice-line);
  border-radius:4px;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu #nomiChatCustomizer .nomi-chat-picker-options > button[aria-pressed="true"] {
  outline:2px solid currentColor;
  outline-offset:-3px;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu #nomiChatCustomizer .nomi-flat-format-colors {
  width:100%!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu #nomiChatCustomizer .nomi-flat-format-colors > button:first-child {
  grid-column:1/-1!important;
  width:100%!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu #nomiChatCustomizer #nomiChatColor[hidden] {
  display:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu .nomi-flat-format-preview > p {
  font-family:var(--nomi-chat-font,Arial),sans-serif!important;
  font-size:var(--nomi-chat-size,16px)!important;
  font-weight:var(--nomi-chat-weight,400)!important;
}
html[data-nomi-theme="dark"].nomi-chat-flat #nomiMessenger[data-theme="midnight"] #nomiThread #nomiThreadMenu #nomiChatCustomizer .nomi-flat-format-colors {
  width:100%!important;
  grid-template-columns:repeat(6,minmax(0,1fr))!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiMessages.nomi-message-list[data-nomi-follow-latest="false"] {
  overflow-anchor:auto!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread .nomi-thread-header {
  background:#151d31!important;
  border-color:#384969!important;
  transition:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread .nomi-thread-header :is(button,.nomi-outline) {
  background:#212e47!important;
  border-color:#485e82!important;
  color:#edf4ff!important;
  transition:none!important;
}
html.nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu:popover-open {
  position:fixed!important;
  inset:var(--nomi-menu-y) auto auto var(--nomi-menu-x)!important;
  width:var(--nomi-menu-width)!important;
  max-height:min(570px,var(--nomi-menu-height))!important;
}
html[data-nomi-theme="light"].nomi-chat-flat #nomiMessenger #nomiThread #nomiThreadMenu .nomi-r7-fixed-header-label {
  background:#e6eefb!important;
  color:#162c4d!important;
}

/* Private thread: reserve the scroll area before its first settled frame. */
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages[data-history-shown]:not([data-nomi-chat-positioned]) {
  visibility:hidden!important;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-chat-media[data-media-pending] {
  min-width:54px;
  min-height:26px;
  background:#263449;
  border-radius:6px;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-chat-media-audio {
  min-height:32px;
}
html.nomi-chat-flat.nomi-chat-r12-bottom #nomiMessenger #nomiThread #nomiMessages .nomi-chat-media-video {
  min-height:72px;
}
html.nomi-chat-flat #nomiMessenger #nomiThreadMenu .nomi-chat-reset-style {
  grid-column:1/-1;
}

/* Scoped to a visible private conversation; never affect game rooms or chat list. */
html.nomi-chat-flat.nomi-chat-r12-bottom body.druzha-private-r18 #nomiMessenger #nomiThread:not([hidden]),
html.nomi-chat-flat.nomi-chat-r12-bottom body.druzha-private-r18.nomi-chat-fixed-layout #nomiMessenger #nomiThread:not([hidden]) {
  position:relative!important; inset:auto!important; transform:none!important;
  display:flex!important; flex-direction:column!important; box-sizing:border-box!important;
  flex:0 0 auto!important; height:var(--druzha-thread-height,calc(100dvh - 120px))!important;
  min-height:0!important; max-height:none!important; overflow:hidden!important;
  margin:0!important; padding:0!important; transition:none!important;
}
html.nomi-chat-flat body.druzha-private-r18 #nomiMessenger #nomiThread #nomiMessages.nomi-message-list {
  order:1!important; position:relative!important; inset:auto!important;
  flex:1 1 auto!important; height:auto!important; min-height:0!important; max-height:none!important;
  overflow-y:auto!important; overflow-x:hidden!important; scroll-behavior:auto!important;
  transform:none!important; transition:none!important;
}
html.nomi-chat-flat body.druzha-private-r18 #nomiMessenger #nomiThread #nomiSendForm {
  order:9!important; position:relative!important; inset:auto!important;
  flex:0 0 auto!important; margin:0!important; transform:none!important; transition:none!important;
}
html.nomi-chat-flat body.druzha-private-r18 #nomiMessenger #nomiThread #nomiChatStatus:empty {display:none!important}
html.nomi-chat-flat body.druzha-private-r18 #nomiMessenger #nomiThread #nomiChatStatus {order:8!important;flex:0 0 auto!important}
html.nomi-chat-flat body.druzha-private-r18 #nomiMessenger #nomiThread > [hidden] {display:none!important}
html.nomi-chat-flat body.druzha-private-r18 .main-area > .content,
html.nomi-chat-flat body.druzha-private-r18 #pageScreen,
html.nomi-chat-flat body.druzha-private-r18 #nomiMessenger {max-height:none!important;overflow:visible!important;min-height:0!important}
html.nomi-chat-flat body.druzha-private-r18 #nomiMessenger #nomiThread #nomiSendForm #nomiMessageText {max-height:112px!important;resize:none!important;overflow-y:auto!important}
html.nomi-chat-flat.nomi-chat-r12-bottom body #nomiMessenger #nomiSendForm.nomi-inline-editing #nomiAttachToggle {display:none!important}
html.nomi-chat-flat.nomi-chat-r12-bottom body #nomiMessenger #nomiSendForm.nomi-inline-editing #nomiMessageText {width:100%!important;max-height:112px!important;padding-left:43px!important;padding-right:44px!important}
html.nomi-chat-flat.nomi-chat-r12-bottom body #nomiMessenger #nomiSendForm .nomi-inline-edit-cancel {width:32px!important;min-width:32px!important;height:32px!important;border:1px solid #8467c0!important;border-radius:8px!important;background:#352555!important;color:#fff!important;font-size:22px!important;position:absolute!important;bottom:4px!important;left:4px!important;right:auto!important;top:auto!important;z-index:3!important;padding:0!important}
