/* Inter, served from this site (OFL licence: assets/fonts/nm-inter.LICENSE.txt). Used only inside #nm-panel and #nm-float. */
@font-face { font-family: "Inter"; src: url("assets/fonts/nm-inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("assets/fonts/nm-inter-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
/* NMSeawise Midnight Luxury, FLOATING MESSENGER POPUP ONLY: the launcher, the individual and group popup windows, their minimised tabs
   and the popup's reply box. Every rule is inside .nm-float (the popup container). There are no global variables, no body or page rules.
   The main Messenger page keeps its original styling; there only behaviour is defined here (three-dot button on hover, long press on touch,
   the sender picture layout, and a neutral name tooltip). */

/* ---------- popup: dark charcoal, subtle glass, champagne-gold accents ---------- */
:is(.nm-float, .nm-panel) {
  --mtp-panel: rgba(30, 30, 30, .78);
  --mtp-bar: rgba(40, 40, 40, .66);
  --mtp-in: #2c2c2c;
  --mtp-line: rgba(217, 181, 122, .18);
  --mtp-gold-hi: #f2dcae;
  --mtp-gold: #d9b57a;
  --mtp-gold-lo: #b98e56;
  --mtp-text: #ececec;
  --mtp-muted: #9a9a9a;
}
:is(.nm-float, .nm-panel) .nm-fw {
  background: var(--mtp-panel);
  -webkit-backdrop-filter: blur(16px) saturate(125%);
  backdrop-filter: blur(16px) saturate(125%);
  border: 1px solid var(--mtp-line);
  border-radius: 18px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 241, 201, .06);
  color: var(--mtp-text);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  overflow: hidden;
}
:is(.nm-float, .nm-panel) .nm-fw .nm-fhdr { background: var(--mtp-bar); border-bottom: 1px solid var(--mtp-line); }
:is(.nm-float, .nm-panel) .nm-fw .nm-fname { color: var(--mtp-gold-hi); font-weight: 600; }
:is(.nm-float, .nm-panel) .nm-fw .nm-fbtn { color: var(--mtp-muted); }
:is(.nm-float, .nm-panel) .nm-fw .nm-fempty { color: var(--mtp-muted); }
:is(.nm-float, .nm-panel) .nm-fm .nm-fbub { border-radius: 18px; padding: 9px 13px; max-width: 80%; font-size: 15px; line-height: 1.4; box-shadow: 0 4px 10px rgba(0, 0, 0, .3); }
:is(.nm-float, .nm-panel) .nm-fm.other .nm-fbub { background: var(--mtp-in); color: var(--mtp-text); }
:is(.nm-float, .nm-panel) .nm-fm.mine .nm-fbub { background: linear-gradient(160deg, var(--mtp-gold-hi) 0%, var(--mtp-gold) 55%, var(--mtp-gold-lo) 100%); color: #1d1d1d; }
:is(.nm-float, .nm-panel) .nm-fm.nm-fgrp { display: flex; align-items: flex-start; gap: 7px; }
:is(.nm-float, .nm-panel) .nm-fcol { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: calc(100% - 31px); }
:is(.nm-float, .nm-panel) .nm-fm.mine .nm-fcol { align-items: flex-end; }
:is(.nm-float, .nm-panel) .nm-fwho { color: var(--mtp-gold); font-size: 12px; font-weight: 600; margin: 0 4px 2px; }
:is(.nm-float, .nm-panel) .nm-fsndr { width: 24px; height: 24px; flex: 0 0 24px; }
:is(.nm-float, .nm-panel) .nm-fgap { display: block; flex: 0 0 24px; width: 24px; height: 0; border: 0; padding: 0; margin: 0; background: none; box-shadow: none; }
:is(.nm-float, .nm-panel) .nm-fw .nm-fform { background: var(--mtp-bar); border-top: 1px solid var(--mtp-line); }
:is(.nm-float, .nm-panel) .nm-fw .nm-fform textarea { background: var(--mtp-in); color: var(--mtp-text); border: 0; border-radius: 22px; box-shadow: none; }
:is(.nm-float, .nm-panel) .nm-fw .nm-fform textarea::placeholder { color: var(--mtp-muted); }
:is(.nm-float, .nm-panel) .nm-fw .nm-fsml-btn { color: var(--mtp-gold); }
:is(.nm-float, .nm-panel) .nm-fw .nm-fsend { width: 40px; height: 40px; min-width: 40px; border-radius: 50%; border: 0; background: linear-gradient(160deg, var(--mtp-gold-hi), var(--mtp-gold-lo)); color: #1d1d1d; box-shadow: 0 6px 14px rgba(0, 0, 0, .4); }
:is(.nm-float, .nm-panel) .nm-fmin, :is(.nm-float, .nm-panel) .nm-flaunch { border: 1.5px solid var(--mtp-gold); box-shadow: 0 0 0 3px rgba(227, 192, 131, .15), 0 0 18px rgba(227, 192, 131, .4), 0 10px 22px rgba(0, 0, 0, .5); background: radial-gradient(circle at 50% 35%, #2a2a2a 0%, #161616 75%); }
/* popup sender pictures: the name tooltip in the popup's own colours */
:is(.nm-float, .nm-panel) .sndr { position: relative; display: inline-flex; border-radius: 50%; outline: none; }
:is(.nm-float, .nm-panel) .sndr .avatar { border: 1px solid rgba(217, 181, 122, .35); }
:is(.nm-float, .nm-panel) .sndr:focus-visible .avatar { box-shadow: 0 0 0 2px var(--mtp-gold); }
:is(.nm-float, .nm-panel) .sndr::after { content: attr(data-name); position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); background: #242424; color: var(--mtp-gold-hi); border: 1px solid var(--mtp-line); border-radius: 8px; padding: 4px 9px; font-size: 13px; line-height: 1.25; font-weight: 600; white-space: nowrap; box-shadow: 0 6px 14px rgba(0, 0, 0, .45); opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 20; }
:is(.nm-float, .nm-panel) .sndr:hover::after, :is(.nm-float, .nm-panel) .sndr:focus-visible::after, :is(.nm-float, .nm-panel) .sndr.show::after { opacity: 1; }

/* launcher panel (nm-panel): the conversation list and the thread header, in the same Midnight palette */
.nm-panel .nm-psearch input { background: var(--mtp-in); color: var(--mtp-text); border: 1px solid var(--mtp-line); border-radius: 18px; }
.nm-panel .nm-prow { color: var(--mtp-text); background: transparent; border-bottom: 1px solid var(--mtp-line); }
.nm-panel .nm-pname { color: var(--mtp-gold-hi); font-weight: 600; }
.nm-panel .nm-prow small, .nm-panel .nm-prow time { color: var(--mtp-muted); }
.nm-panel .nm-pavatar .avatar { border: 1px solid rgba(217, 181, 122, .35); }
.nm-panel .nm-fbadge { background: linear-gradient(180deg, var(--mtp-gold-hi), var(--mtp-gold-lo)); color: #1d1d1d; }

/* ---------- main Messenger page: behaviour only, no colour or font change ---------- */
/* three-dot message menu: desktop shows it on hover (or keyboard focus); touch screens open it with a long press on the message */
@media (hover: hover) and (pointer: fine) {
  #screen .msg .msg-more { opacity: 0; transition: opacity .15s ease; }
  #screen .msg:hover .msg-more, #screen .msg:focus-within .msg-more, #screen .msg .msg-more:focus-visible { opacity: 1; }
}
@media (hover: none), (pointer: coarse) {
  #screen .msg .msg-more { opacity: 0; pointer-events: none; }
  #screen .msg .bub { -webkit-touch-callout: none; }
}
/* group chats, main page: the sender's picture (first of a run) keeps its space; the rest of the run keeps the same space */
#screen .msg.other .sndr { align-self: flex-start; width: 30px; height: 30px; flex: 0 0 30px; }
#screen .msg.other .sndr-gap { display: block; flex: 0 0 30px; width: 30px; height: 0; border: 0; padding: 0; margin: 0; background: none; box-shadow: none; }
#screen .msg.other .sndr .avatar { width: 30px !important; height: 30px !important; font-size: 13px !important; }
#screen .sndr { position: relative; display: inline-flex; border-radius: 50%; outline: none; }
#screen .sndr::after { content: attr(data-name); position: absolute; left: calc(100% + 8px); top: 50%; transform: translateY(-50%); background: #2a2a2a; color: #f3f3f3; border: 1px solid #3a3a3a; border-radius: 8px; padding: 4px 9px; font-size: 13px; line-height: 1.25; font-weight: 600; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .12s; z-index: 20; }
#screen .sndr:hover::after, #screen .sndr:focus-visible::after, #screen .sndr.show::after { opacity: 1; }

/* ---------- message timestamps (main Messenger): the same font as the message text, pure white, full opacity, 12 px, weight 400.
   Only the timestamp is changed; the message text and the bubble colours are not. */
#screen .msg .message-content > .tm,
#screen .chat.has-look .msg.mine .message-content > .tm,
#screen .chat.has-look .msg.other .message-content > .tm {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important; font-variant-numeric: tabular-nums; color: #ffffff !important; opacity: 1 !important; font-size: 12px !important; font-weight: 400 !important;
}

/* ---------- popup: time under each message (the same font as the message text, pure white, 12 px, weight 400) ---------- */
:is(.nm-float, .nm-panel) .nm-fwrap { display: flex; flex-direction: column; max-width: 80%; }
:is(.nm-float, .nm-panel) .nm-fm.mine .nm-fwrap { align-items: flex-end; }
:is(#nm-float, #nm-panel) .nm-fwrap { display: block; max-width: 80%; }
:is(#nm-float, #nm-panel) .nm-fwrap .nm-fbub { display: inline-block; vertical-align: top; }
:is(#nm-float, #nm-panel) .nm-fwrap .nm-ftm { display: block; }
:is(#nm-float, #nm-panel) .nm-fm.mine .nm-fwrap { text-align: right; }
:is(#nm-float, #nm-panel) .nm-fwrap .nm-fbub { max-width: 100%; }
:is(.nm-float, .nm-panel) .nm-ftm { display: block; font-family: inherit; color: #ffffff; opacity: 1; font-size: 12px; font-weight: 400; margin: 3px 4px 0; line-height: 1.2; }

/* ---------- main Messenger: sender picture on the LEFT of an incoming group message (the message row is a two-column grid) ---------- */
#screen .msg.other:has(> .sndr),
#screen .msg.other:has(> .sndr-gap) { grid-template-columns: 30px minmax(0, 1fr) 32px; column-gap: 8px; }
#screen .msg.other:has(> .sndr) > .sndr, #screen .msg.other:has(> .sndr-gap) > .sndr-gap { grid-column: 1; grid-row: 1 / span 2; align-self: start; }
#screen .msg.other:has(> .sndr) > .message-content, #screen .msg.other:has(> .sndr-gap) > .message-content { grid-column: 2; grid-row: 1; }
#screen .msg.other:has(> .sndr) > .message-under, #screen .msg.other:has(> .sndr-gap) > .message-under { grid-column: 2; grid-row: 2; }
#screen .msg.other:has(> .sndr) > .msg-more, #screen .msg.other:has(> .sndr-gap) > .msg-more { grid-column: 3; grid-row: 1; }

/* ---------- phones: no sideways scroll in the popup ---------- */
@media (max-width: 480px) {
  :is(.nm-float, .nm-panel) .nm-fm .nm-fbub { max-width: none; }
}

/* ---------- 0.30.53: Midnight Luxury, corrected. The launcher panel (.nm-panel) and the floating popup (.nm-float) only.
   Overrides the legacy rules in styles.css and reference.css (blue bubbles, #182432 panels) by element id, which outranks them. */
:is(#nm-float, #nm-panel) {
  --mtp-bg: #141820;
  --mtp-bubble-in: #292F39;
  --mtp-bubble-out: #D4B77D;
  --mtp-ink-out: #15110a;
  --mtp-ink: #EDEFF3;
  --mtp-field: #1b2029;
  --mtp-rule: rgba(255, 255, 255, .09);
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
:is(#nm-float, #nm-panel) * { font-family: inherit; }
#nm-panel { background: #141820 !important; border: 1px solid var(--mtp-rule); border-radius: 16px; box-shadow: 0 16px 40px rgba(0, 0, 0, .55); }
:is(#nm-float, #nm-panel) .nm-fw, :is(#nm-float, #nm-panel) .nm-fw .nm-flist { background: var(--mtp-bg); }
:is(#nm-float, #nm-panel) .nm-fhdr, :is(#nm-float, #nm-panel) .nm-panel-hdr { background: var(--mtp-bg); border-bottom: 1px solid var(--mtp-rule); color: var(--mtp-ink); }
:is(#nm-float, #nm-panel) .nm-fname, :is(#nm-float, #nm-panel) .nm-pname { color: #D4B77D; font-weight: 600; }
:is(#nm-float, #nm-panel) .nm-plist-msgs, :is(#nm-float, #nm-panel) .nm-flist { background: var(--mtp-bg); padding: 12px; gap: 8px; scrollbar-width: thin; scrollbar-color: #3a414d transparent; }
:is(#nm-float, #nm-panel) .nm-plist-msgs::-webkit-scrollbar, :is(#nm-float, #nm-panel) .nm-flist::-webkit-scrollbar { width: 6px; }
:is(#nm-float, #nm-panel) .nm-plist-msgs::-webkit-scrollbar-thumb, :is(#nm-float, #nm-panel) .nm-flist::-webkit-scrollbar-thumb { background: #3a414d; border-radius: 3px; }
:is(#nm-float, #nm-panel) .nm-fm { background: transparent; }
:is(#nm-float, #nm-panel) .nm-fm .nm-fbub { width: auto; max-width: 100%; background: #292F39 !important; background-image: none; color: var(--mtp-ink); border-radius: 14px; padding: 9px 13px; max-width: none; overflow-wrap: anywhere; box-shadow: none; font-size: 14px; line-height: 1.4; }
:is(#nm-float, #nm-panel) .nm-fm.mine .nm-fbub { background: #D4B77D !important; background-image: none; color: var(--mtp-ink-out); }
:is(#nm-float, #nm-panel) .nm-fwrap, :is(#nm-float, #nm-panel) .nm-fcol { background: transparent; }
:is(#nm-float, #nm-panel) .nm-ftm { background: transparent; color: #ffffff; opacity: 1; font-size: 12px; font-weight: 400; margin: 3px 4px 0; padding: 0; }
:is(#nm-float, #nm-panel) .nm-fw .nm-fform, :is(#nm-float, #nm-panel) .nm-panel-reply { background: var(--mtp-bg); border-top: 1px solid var(--mtp-rule); padding: 10px; gap: 8px; }
:is(#nm-float, #nm-panel) textarea { background: var(--mtp-field); color: var(--mtp-ink); border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; padding: 9px 12px; font-family: inherit; font-size: 14px; box-shadow: none; }
:is(#nm-float, #nm-panel) textarea:focus { outline: none; border-color: rgba(212, 183, 125, .6); }
:is(#nm-float, #nm-panel) .nm-fsend, :is(#nm-float, #nm-panel) .nm-panel-reply .nm-fsend { background: #D4B77D; color: #15110a; border: 0; border-radius: 12px; width: 40px; height: 36px; box-shadow: none; }
:is(#nm-float, #nm-panel) .nm-fsend:hover { background: #e0c48c; }
:is(#nm-float, #nm-panel) .nm-psearch input { background: var(--mtp-field); color: var(--mtp-ink); border: 1px solid rgba(255, 255, 255, .12); border-radius: 16px; font-family: inherit; }
:is(#nm-float, #nm-panel) .nm-prow { background: transparent; border-bottom: 1px solid var(--mtp-rule); color: var(--mtp-ink); }
:is(#nm-float, #nm-panel) .nm-prow small, :is(#nm-float, #nm-panel) .nm-prow time { color: #9aa3b2; background: transparent; }

/* 0.30.54: staged attachments (drag-and-drop and picked files wait in the composer until Send) */
.composer.two { position: relative; }
.drop-hint { display: none; position: absolute; inset: 4px 8px; align-items: center; justify-content: center; border-radius: 14px; background: rgba(20,24,32,.82); border: 1px dashed #D4B77D; color: #D4B77D; font: 600 15px Inter, system-ui, sans-serif; pointer-events: none; z-index: 2; }
body.nm-drop-active .nm-drop-target { box-shadow: inset 0 0 0 1px rgba(212,183,125,.6); }
body.nm-drop-active .nm-drop-target .drop-hint { display: flex; }
/* the popup window and the launcher panel: the chips span the reply box, the attach button sits beside the text */
:is(#nm-float, #nm-panel) .nm-fatt { width: 34px; height: 34px; flex: 0 0 auto; border: 0; border-radius: 17px; background: transparent; color: #C9CDD6; display: grid; place-items: center; cursor: pointer; padding: 0; }
:is(#nm-float, #nm-panel) .nm-fatt svg { width: 18px; height: 18px; }
:is(#nm-float, #nm-panel) .nm-fatt:hover { color: #D4B77D; }
:is(#nm-float, #nm-panel) .nm-fatt:focus-visible { outline: 2px solid #D4B77D; outline-offset: 1px; }
:is(#nm-float, #nm-panel) .drop-hint { display: none; position: absolute; inset: 4px 8px; align-items: center; justify-content: center; border-radius: 14px; background: rgba(20,24,32,.86); border: 1px dashed #D4B77D; color: #D4B77D; font: 600 14px Inter, system-ui, sans-serif; pointer-events: none; z-index: 2; }
:is(#nm-float, #nm-panel) .nm-fw.nm-drop-target, :is(#nm-float, #nm-panel) .nm-plist-msgs.nm-drop-target { box-shadow: inset 0 0 0 1px rgba(212,183,125,.6); }

/* 0.30.55: Messenger timestamps. The locally hosted Inter (400), 12 px, #FFFFFF, tabular figures. Never Cormorant Garamond:
   the explicit family beats the inherited global font and the older colour rules (for example the "has-look" meta colour).
   Covers the main Messenger, the conversation list, the floating popup and the launcher panel. The time format is unchanged. */
#screen .msg .tm,
#screen .msg .message-content > .tm,
#screen .chat.has-look .msg .tm,
#screen .chat.has-look .msg .tm *,
.conv .top > small,
#nm-float .nm-ftm, #nm-panel .nm-ftm,
#nm-panel .nm-ptop time, #nm-float .nm-ptop time {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  color: #FFFFFF !important;
  opacity: 1 !important;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}

/* 0.30.55: staged attachments, compact like the Messenger preview: 48 px tiles, Remove in the corner, a "+" tile, one scrollable row.
   The row never grows: the caption line is fixed, the Send button stays in the composer. Midnight colours in the popup and panel. */
.stage-wrap { flex: 0 0 auto; order: -1; min-width: 0; max-width: 100%; }
:is(#nm-float, #nm-panel) .stage-wrap { flex: 0 0 100%; }
.stage-line { display: flex; align-items: center; gap: 8px; min-width: 0; }
.stage-row { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 8px; overflow-x: auto; overflow-y: hidden; padding: 8px 8px 2px 2px; scrollbar-width: thin; }
.stage-chip { position: relative; flex: 0 0 48px; width: 48px; height: 48px; border-radius: 10px; background: #1b2029; border: 1px solid rgba(255,255,255,.14); color: #EDEFF3; font: 12px/1.2 Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }
.stage-chip.bad { border-color: rgba(230,120,100,.85); }
.stage-chip:focus-visible { outline: 2px solid #D4B77D; outline-offset: 2px; }
.stage-thumb { width: 48px; height: 48px; border-radius: 9px; object-fit: cover; display: block; }
.stage-file { width: 48px; height: 48px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.06); }
.stage-file b { font-size: 11px; font-weight: 600; letter-spacing: .02em; color: #D4B77D; }
.stage-state:empty { display: none; }
.stage-chip.bad .stage-state, .stage-chip.uploading .stage-state { position: absolute; left: 2px; right: 2px; bottom: 2px; padding: 1px 3px; border-radius: 6px; background: rgba(13,16,22,.88); color: #EDEFF3; font-size: 9px; line-height: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
.stage-chip.bad .stage-state { color: #F3B3A6; }
.stage-x { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px; border-radius: 10px; border: 1px solid rgba(255,255,255,.3); background: #0d1016; color: #EDEFF3; font-size: 14px; line-height: 17px; padding: 0; cursor: pointer; text-align: center; }
.stage-x:focus-visible, .stage-add:focus-visible { outline: 2px solid #D4B77D; outline-offset: 1px; }
.stage-add { flex: 0 0 48px; margin-top: 8px; width: 48px; height: 48px; border-radius: 10px; border: 1px dashed rgba(212,183,125,.7); background: transparent; color: #D4B77D; font-size: 24px; line-height: 44px; padding: 0; cursor: pointer; }
.stage-caption { height: 16px; margin: 2px 2px 0; font: 12px/16px Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: #C9CDD6; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
:is(#nm-float, #nm-panel) form[data-stage-conv] { flex-wrap: wrap; position: relative; }
:is(#nm-float, #nm-panel) .stage-caption { font-size: 11px; line-height: 16px; }
/* received files inside the popup and the panel (the same markup as the main Messenger) */
:is(#nm-float, #nm-panel) .att { display: flex; align-items: center; gap: 8px; width: 100%; background: none; border: 0; padding: 4px 0; color: inherit; font: inherit; text-align: left; cursor: pointer; }
:is(#nm-float, #nm-panel) .att .n { font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
:is(#nm-float, #nm-panel) .att small { display: block; opacity: .8; font-size: 12px; }
:is(#nm-float, #nm-panel) .att-img { position: relative; display: block; width: 100%; max-width: 220px; aspect-ratio: 11 / 8; border: 0; border-radius: 12px; overflow: hidden; background: rgba(0,0,0,.25); padding: 0; cursor: pointer; }
:is(#nm-float, #nm-panel) .att-img img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .2s; }
:is(#nm-float, #nm-panel) .att-img.ready img { opacity: 1; }
:is(#nm-float, #nm-panel) .att-img .fail { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 8px; font-size: 12px; text-align: center; color: #C9CDD6; }
:is(#nm-float, #nm-panel) .att-img .fail[hidden] { display: none; }

/* 0.30.57: header buttons of the popup window and the launcher panel: a 36 px touch target (was 30 px) */
:is(#nm-float, #nm-panel) .nm-fbtn { width: 36px; height: 36px; min-width: 36px; min-height: 36px; display: grid; place-items: center; }

/* 0.30.57: Chat Heads, in-app (this browser). Round profile pictures with a champagne ring, compact unread badges, animated open. */
.nm-heads { position: fixed; right: max(10px, env(safe-area-inset-right, 0px)); top: calc(96px + env(safe-area-inset-top, 0px)); z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.nm-heads-min { width: 26px; height: 26px; border-radius: 13px; border: 1px solid rgba(212,183,125,.55); background: rgba(20,24,32,.92); color: #D4B77D; cursor: pointer; font-size: 16px; line-height: 22px; padding: 0; }
.nm-heads-min:focus-visible, .nm-head:focus-visible, .nm-head-x:focus-visible { outline: 2px solid #D4B77D; outline-offset: 2px; }
.nm-head-item { position: relative; animation: nm-head-in .22s ease-out; }
.nm-head { position: relative; width: 52px; height: 52px; border-radius: 50%; border: 2px solid #D4B77D; background: #141820; padding: 0; cursor: pointer; box-shadow: 0 6px 18px rgba(0,0,0,.45); display: grid; place-items: center; transition: transform .15s ease; }
.nm-head:hover { transform: scale(1.06); }
.nm-head .avatar, .nm-head .group { width: 46px !important; height: 46px !important; font-size: 18px; }
.nm-head .avatar img, .nm-head img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.nm-head .nm-fbadge { position: absolute; right: -4px; bottom: -4px; top: auto; }
.nm-head-x { position: absolute; top: -6px; left: -6px; width: 22px; height: 22px; border-radius: 11px; border: 1px solid rgba(255,255,255,.3); background: #0d1016; color: #EDEFF3; font-size: 14px; line-height: 19px; padding: 0; cursor: pointer; }
.nm-heads.collapsed .nm-head-item { display: none; }
@keyframes nm-head-in { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .nm-head-item { animation: none; } .nm-head { transition: none; } }
.msg-more-menu button { display: block; width: 100%; text-align: left; padding: 10px 12px; border: 0; border-radius: 8px; background: transparent; color: var(--text); font: inherit; font-size: 15px; white-space: nowrap; cursor: pointer; }
.msg-more-menu button:hover, .msg-more-menu button:focus-visible { background: rgba(255, 255, 255, .07); outline: none; }

/* 0.30.57: keyboard. While the keyboard is open (app.js: kb-open, from the visual viewport) the composer sits right on it:
   no safe-area gap under it, no tab bar, the newest message stays in view. Nothing is measured here; the layout follows the visual viewport. */
html.kb-open .screen { padding-bottom: 0 !important; }
html.kb-open .composer, html.kb-open .composer.two, html.kb-open form[data-stage-conv] { padding-bottom: 6px !important; }
html.kb-open :is(#nm-float, #nm-panel) { padding-bottom: 0 !important; }
html.kb-open .tabs { display: none !important; }

/* 0.30.57: Messenger typography. Inter (locally hosted) in the messaging interface only; the composer is 16 px so iOS does not zoom. */
#screen .chat, #screen .chat-list, #screen .conv, #screen .msg, #screen .composer, #screen .quote, #screen .att, #screen .att .n, #screen .att small,
:is(#nm-float, #nm-panel), :is(#nm-float, #nm-panel) textarea, .msg-more-menu button {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
#screen .msg .bub, #screen .msg .bub .txt, #screen .msg .bub p, :is(#nm-float, #nm-panel) .nm-fbub {
  font-size: 15px !important; font-weight: 400; line-height: 1.4;
}
#screen .conv .prev { font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-weight: 400; }
#soc-body, #screen .composer textarea, :is(#nm-float, #nm-panel) textarea {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400; line-height: 1.4;
}
#soc-body::placeholder, #screen .composer textarea::placeholder, :is(#nm-float, #nm-panel) textarea::placeholder {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; font-size: 16px; font-weight: 400;
}

/* 0.30.57: pending pictures and files (instant sending): the local copy at once, a subtle progress line, Retry on failure */
.msg.opt .opt-bub { opacity: .92; }
.msg.opt.failed .opt-bub { outline: 1px solid rgba(230,120,100,.7); }
.opt-img { display: block; width: 220px; max-width: 100%; aspect-ratio: 11 / 8; object-fit: cover; border-radius: 12px; }
.opt-file { display: inline-flex; align-items: center; gap: 6px; }
.opt-state { display: block; font-size: 12px; color: #C9CDD6; margin-top: 4px; }
.opt-state.bad { color: #F3B3A6; }
.opt-bar { display: block; height: 2px; margin-top: 4px; border-radius: 1px; background: rgba(255,255,255,.12); overflow: hidden; }
.opt-bar i { display: block; height: 100%; width: 40%; background: #D4B77D; }
.opt-bar i.opt-ind { animation: opt-slide 1.1s ease-in-out infinite; }
@keyframes opt-slide { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
@media (prefers-reduced-motion: reduce) { .opt-bar i.opt-ind { animation: none; width: 100%; opacity: .5; } }

/* 0.30.58 typography: message text is Inter 15 px in every Messenger surface, also in chats with a custom look (which set --bubble-font) */
#screen .msg .bub .txt, #screen .chat.has-look .msg .txt, #screen .chat.has-look .msg .bub .txt, #screen .msg .bub p.txt {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 15px !important; font-weight: 400 !important; line-height: 1.4 !important;
}
:is(#nm-float, #nm-panel) .nm-fw, :is(#nm-float, #nm-panel) .nm-fw .nm-flist, :is(#nm-float, #nm-panel) .nm-fbub {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

/* 0.30.58: a picture that is still loading shows a quiet shimmer in its frame (never an empty bubble); a failed one shows its message */
#screen .att-img:not(.ready):not(.failed), :is(#nm-float, #nm-panel) .att-img:not(.ready):not(.failed), .opt-img {
  background: linear-gradient(100deg, rgba(255,255,255,.04) 30%, rgba(255,255,255,.12) 50%, rgba(255,255,255,.04) 70%) 0 0 / 200% 100%, rgba(0,0,0,.25);
  animation: att-shimmer 1.2s linear infinite;
}
@keyframes att-shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { #screen .att-img:not(.ready):not(.failed) { animation: none; } }

/* 0.30.59: lightbox for received pictures. Fitted, centred, enlarged when small, zoom and pan; respects safe areas; the page behind does not scroll. */
html.lb-open, html.lb-open body { overflow: hidden; overscroll-behavior: none; }
.lightbox { display: block; padding: 0; background: rgba(4,10,20,.95); }
.lightbox .lb-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; overflow: hidden; touch-action: none; user-select: none; -webkit-user-select: none; }
.lightbox .lb-stage img { position: relative; display: block; max-width: none; max-height: none; object-fit: contain; border-radius: 6px; box-shadow: 0 10px 40px rgba(0,0,0,.5); cursor: grab; transform-origin: center; }
.lightbox .lb-close { z-index: 2; }
.lightbox .lb-bar { position: absolute; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 14px); z-index: 2; display: flex; gap: 6px; padding: 6px; border-radius: 999px; background: rgba(20,24,32,.9); border: 1px solid rgba(212,183,125,.35); }
.lightbox .lb-btn { min-width: 44px; min-height: 44px; border: 0; border-radius: 22px; background: transparent; color: #EDEFF3; font: 600 20px/1 Inter, system-ui, sans-serif; cursor: pointer; }
.lightbox .lb-btn:hover, .lightbox .lb-btn:focus-visible, .lightbox .lb-close:focus-visible { background: rgba(212,183,125,.18); outline: 2px solid #D4B77D; outline-offset: 1px; }
.lightbox .lb-fail { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; color: #C9CDD6; }
.lightbox .lb-fail[hidden] { display: none; }

.att-dl { display: inline-block; margin: 2px 0 6px; min-height: 36px; padding: 6px 12px; border-radius: 18px; border: 1px solid rgba(212,183,125,.45); background: transparent; color: #D4B77D; font: 600 13px/1 Inter, system-ui, sans-serif; cursor: pointer; }
.att-dl:hover, .att-dl:focus-visible { background: rgba(212,183,125,.14); outline: 2px solid #D4B77D; outline-offset: 1px; }

/* 0.30.59: on phones the popup windows and banners stay hidden, but Chat Heads are shown (they are the phone surface for conversations) */
/* phones only (html.nm-phone is set from the device class, not the width) */
html.nm-phone #nm-launch { display: none !important; }
@media (max-width: 700px) {
  html.nm-phone .nm-float { display: block !important; }
  html.nm-phone .nm-float > :not(.nm-heads) { display: none !important; }
}
