/* MatthewMail 0.9.45 chat - a private family messenger for Matthew and Courtney.
   Brand: MatthewMail black + Matthew red (the logo's chrome M). Type: Atkinson Hyperlegible Next (made for low vision), 18 px base,
   21 px with "Bigger text". Phone first (S24 Ultra), 360-1920 px, nothing overlaps. Dark by default; Light and Auto in chat info. */
@font-face { font-family: 'Atkinson Next'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(/app/fonts/atkinson-next-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Atkinson Next'; font-style: normal; font-display: swap; font-weight: 200 800; src: url(/app/fonts/atkinson-next-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

.mx {
  --bg: #000000; --pane: #0B0B0D; --surface: #141417; --raised: #1C1C21; --steel: #26262D; --line: #2E2E36; --line-2: #3A3A44;
  --text: #EDEBE8; --text-2: #A6A4AB; --text-3: #7E7C84;
  --crimson: #C8102E; --garnet: #8E0B1F; --ember: #FF3B4E; --focus: #FF6B7A; --online: #34D27F; --warn: #F2B544;
  --mine-a: #D7192F; --mine-b: #B0102A; --mine-c: #8E0B1F; --mine-text: #FFFFFF; --mine-2: rgba(255, 255, 255, .78);
  --theirs: #222228; --theirs-text: #EDEBE8; --theirs-2: #A6A4AB;
  --quote-mine: rgba(0, 0, 0, .22); --quote-theirs: rgba(255, 255, 255, .06);
  --glow: radial-gradient(120% 55% at 50% -12%, rgba(200, 16, 46, .16), rgba(200, 16, 46, 0) 62%);
  --shadow: 0 10px 40px rgba(0, 0, 0, .55);
  --fs: 18px; --r-b: 20px;
  position: fixed; inset: 0; z-index: 10; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr);
  background: var(--bg); color: var(--text); font-family: 'Atkinson Next', 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: var(--fs); line-height: 1.4; -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; overflow: hidden; color-scheme: dark;
}
.mx[data-size="big"] { --fs: 21px; }
.mx[data-theme="light"] {
  --bg: #ECEEF2; --pane: #F7F8FA; --surface: #FFFFFF; --raised: #F2F3F6; --steel: #E6E8EC; --line: #D8DBE1; --line-2: #C6CAD2;
  --text: #15161A; --text-2: #50535B; --text-3: #6C707A; --ember: #C8102E; --focus: #C8102E; --online: #16934F;
  --theirs: #FFFFFF; --theirs-text: #15161A; --theirs-2: #50535B; --quote-theirs: rgba(0, 0, 0, .05);
  --glow: radial-gradient(120% 55% at 50% -12%, rgba(200, 16, 46, .07), rgba(200, 16, 46, 0) 62%);
  --shadow: 0 10px 34px rgba(20, 22, 30, .18); color-scheme: light;
}
.mx *, .mx *::before, .mx *::after { box-sizing: border-box; }
:where(.mx) button { font: inherit; color: inherit; background: none; border: 0; border-radius: 0; padding: 0; margin: 0; min-height: 0; cursor: pointer; box-shadow: none; }
:where(.mx) button:disabled { cursor: default; opacity: .5; }
:where(.mx) input, :where(.mx) textarea, :where(.mx) select { font: inherit; color: inherit; background: none; border: 0; border-radius: 0; padding: 0; margin: 0; min-height: 0; width: auto; box-shadow: none; }
:where(.mx) textarea { resize: none; }
.mx a { color: inherit; }
.mx :focus { outline: none; }
.mx :focus-visible { outline: 2.5px solid var(--focus); outline-offset: 2px; border-radius: 12px; }
.mx img { max-width: 100%; }
.mx [hidden] { display: none !important; }
.mx-ic { display: inline-flex; width: 24px; height: 24px; flex: none; }
.mx-ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mx-ic.fill svg { fill: currentColor; stroke: none; }
.mx-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- panes */
.mx-side { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--pane); border-right: 1px solid var(--line); }
.mx-conv { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--glow), var(--bg); }
.mx-drawer { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--pane); border-left: 1px solid var(--line); }
.mx[data-view="list"] .mx-conv { display: none; }
.mx[data-view="room"] .mx-side { display: none; }
.mx-drawer { position: absolute; inset: 0; z-index: 30; border-left: 0; }
@media (min-width: 900px) {
  .mx { grid-template-columns: minmax(310px, 360px) minmax(0, 1fr); }
  .mx[data-view] .mx-side, .mx[data-view] .mx-conv { display: flex; }
  .mx.drawer-open { grid-template-columns: minmax(310px, 360px) minmax(0, 1fr) minmax(320px, 380px); }
  .mx-drawer { position: static; border-left: 1px solid var(--line); }
  .mx-back { display: none !important; }
}
@media (min-width: 1500px) { .mx { grid-template-columns: 400px minmax(0, 1fr); } .mx.drawer-open { grid-template-columns: 400px minmax(0, 1fr) 400px; } }

/* ---------- buttons */
.mx-ib { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 50%; color: var(--text); flex: none; transition: background-color .15s; }
.mx-ib:hover { background: var(--steel); }
.mx-ib:active { background: var(--line); }
.mx-ib .mx-badge { position: absolute; top: 2px; right: -3px; min-width: 20px; height: 20px; padding: 0 5px; font-size: .62em; box-shadow: 0 0 0 2px var(--pane); }
.mx-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--crimson); color: #fff; font-size: .74em; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.mx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 18px; border-radius: 14px; background: var(--steel); color: var(--text); font-weight: 650; }
.mx-btn:hover { background: var(--line); }
.mx-btn.red { background: linear-gradient(170deg, var(--mine-a), var(--mine-c)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22); }
.mx-btn.red:hover { filter: brightness(1.08); }
.mx-btn.danger { background: transparent; color: var(--ember); border: 1.5px solid currentColor; }
.mx-btn.ghost { background: transparent; border: 1.5px solid var(--line-2); }
.mx-btn.wide { width: 100%; }

/* ---------- app bar + chat list */
.mx-appbar { display: flex; align-items: center; gap: 10px; min-height: 68px; padding: 10px 8px 10px 14px; flex: none; }
.mx-logo { width: 42px; height: 42px; border-radius: 50%; flex: none; box-shadow: 0 0 0 1px rgba(255, 59, 78, .25), 0 0 18px rgba(200, 16, 46, .35); }
.mx[data-theme="light"] .mx-logo { box-shadow: 0 0 0 1px rgba(200, 16, 46, .18); }
.mx-brand { min-width: 0; flex: 1; line-height: 1.12; }
.mx-word { font-size: 1.16em; font-weight: 800; letter-spacing: -.012em; white-space: nowrap; }
.mx-word b { color: var(--ember); font-weight: 800; }
.mx-sub { font-size: .72em; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.mx-find { padding: 0 14px 10px; flex: none; }
.mx-field { display: flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; border-radius: 14px; background: var(--steel); color: var(--text-2); }
.mx-field input { flex: 1; min-width: 0; color: var(--text); height: 46px; }
.mx-field input::placeholder { color: var(--text-3); }
.mx-rooms { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 2px 8px 16px; }
.mx-room { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 80px; padding: 10px 10px; border-radius: 16px; text-align: left; }
.mx-room:hover { background: var(--raised); }
.mx-room.active { background: var(--steel); }
.mx-rmain { display: block; flex: 1; min-width: 0; }
.mx-rtop, .mx-rbot { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.mx-rbot { align-items: center; margin-top: 3px; }
.mx-rname { flex: 1; min-width: 0; font-weight: 700; font-size: 1.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-rtime { flex: none; font-size: .74em; color: var(--text-3); font-variant-numeric: tabular-nums; }
.mx-room.unread .mx-rtime { color: var(--ember); font-weight: 700; }
.mx-rprev { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; color: var(--text-2); font-size: .88em; white-space: nowrap; overflow: hidden; }
.mx-rprev > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.mx-room.unread .mx-rprev { color: var(--text); }
.mx-rprev .typing { color: var(--ember); font-weight: 650; }
.mx-rflags { display: inline-flex; align-items: center; gap: 6px; flex: none; color: var(--text-3); }
.mx-rflags .mx-ic { width: 18px; height: 18px; }
.mx-empty { display: grid; place-items: center; gap: 14px; text-align: center; padding: 40px 20px; color: var(--text-2); }
.mx-empty img { width: 96px; height: 96px; border-radius: 50%; opacity: .95; }
.mx-empty h2 { margin: 0; font-size: 1.25em; color: var(--text); font-weight: 750; }
.mx-empty p { margin: 0; max-width: 34ch; }

/* ---------- avatars */
.mx-av { position: relative; flex: none; display: inline-flex; align-items: center; justify-content: center; width: 54px; height: 54px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 1.05em;
  background: var(--avbg, #5b2430); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18); }
.mx-av.sm { width: 42px; height: 42px; font-size: .92em; }
.mx-av.xs { width: 30px; height: 30px; font-size: .72em; }
.mx-av.lg { width: 96px; height: 96px; font-size: 1.9em; }
.mx-dot { position: absolute; right: 0; bottom: 1px; width: 15px; height: 15px; border-radius: 50%; background: var(--online); box-shadow: 0 0 0 3px var(--pane); }
.mx-av.sm .mx-dot { width: 12px; height: 12px; }

/* ---------- conversation header */
.mx-chead { display: flex; align-items: center; gap: 6px; min-height: 68px; padding: 8px 6px 8px 6px; flex: none; background: color-mix(in srgb, var(--pane) 88%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); z-index: 3; }
@media (min-width: 900px) { .mx-chead { padding-left: 18px; } }
.mx-who { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; padding: 4px 6px; border-radius: 14px; text-align: left; }
.mx-who:hover { background: var(--raised); }
.mx-title { min-width: 0; flex: 1; }
.mx-name { font-weight: 750; font-size: 1.06em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-status { font-size: .76em; color: var(--text-2); white-space: nowrap; overflow: hidden; display: flex; align-items: center; gap: 6px; min-width: 0; }
.mx-status > span:not(.on) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 480px) { .mx-chead .mx-ib.hide-narrow { display: none; } }   /* phones: search lives in chat info, the name gets the room */
@media (max-width: 400px) { .mx-chead .mx-av.sm { width: 38px; height: 38px; } }
.mx-status .on { width: 9px; height: 9px; border-radius: 50%; background: var(--online); flex: none; }
.mx-status .typing { color: var(--ember); font-weight: 650; }
.mx-pinbar { display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 6px 12px 6px 16px; flex: none; background: var(--pane); border-bottom: 1px solid var(--line); text-align: left; width: 100%; }
.mx-pinbar .mx-ic { color: var(--ember); width: 20px; height: 20px; }
.mx-pinbar .t { flex: 1; min-width: 0; font-size: .86em; }
.mx-pinbar .t b { display: block; color: var(--ember); font-size: .9em; }
.mx-pinbar .t span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.mx-search { display: flex; align-items: center; gap: 6px; padding: 8px 8px 8px 12px; flex: none; border-bottom: 1px solid var(--line); background: var(--pane); }
.mx-search .mx-field { flex: 1; min-width: 0; }
.mx-search .count { font-size: .76em; color: var(--text-2); white-space: nowrap; min-width: 3.5em; text-align: center; }
.mx-results { position: absolute; left: 0; right: 0; z-index: 6; max-height: 55%; overflow-y: auto; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
.mx-result { display: block; width: 100%; text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.mx-result:hover, .mx-result.cur { background: var(--raised); }
.mx-result .top { display: flex; justify-content: space-between; gap: 8px; font-size: .76em; color: var(--text-2); }
.mx-result .snip { margin-top: 2px; overflow-wrap: anywhere; }
.mx-result mark, .mx-txt mark { background: rgba(255, 59, 78, .32); color: inherit; border-radius: 4px; padding: 0 2px; }

/* ---------- thread */
.mx-body { position: relative; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.mx-scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; scroll-behavior: auto; }
.mx-col { max-width: 880px; margin: 0 auto; padding: 10px 12px 14px; display: flex; flex-direction: column; min-height: 100%; }
@media (min-width: 900px) { .mx-col { padding: 16px 28px 18px; } }
.mx-col > .mx-msgs { margin-top: auto; }
.mx-earlier { align-self: center; margin: 6px 0 10px; }
.mx-day { position: relative; align-self: center; margin: 16px 0 8px; padding: 5px 14px; border-radius: 999px; background: color-mix(in srgb, var(--surface) 92%, transparent); border: 1px solid var(--line);
  color: var(--text-2); font-size: .76em; font-weight: 700; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.mx-unreadline { display: flex; align-items: center; gap: 12px; margin: 14px 4px 6px; color: var(--ember); font-size: .78em; font-weight: 750; }
.mx-unreadline::before, .mx-unreadline::after { content: ""; flex: 1; height: 1.5px; background: currentColor; opacity: .55; }
.mx-sys { align-self: center; max-width: 85%; margin: 10px 0; padding: 6px 14px; border-radius: 12px; background: var(--raised); color: var(--text-2); font-size: .8em; text-align: center; }
.mx-msgs { display: flex; flex-direction: column; }
.mx-row { position: relative; display: flex; flex-direction: column; align-items: flex-start; margin-top: 3px; max-width: 100%; touch-action: pan-y; }
.mx-row.mine { align-items: flex-end; }
.mx-row.g-first { margin-top: 12px; }
.mx-row.flash .mx-b { animation: mxflash 1.6s ease-out 2; }
@keyframes mxflash { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 78, 0); } 30% { box-shadow: 0 0 0 5px rgba(255, 59, 78, .55); } }
.mx-row:not(.g-first) > .mx-sender { display: none; }
.mx-row:not(.g-last) .mx-gav > * { visibility: hidden; }
.mx a.mx-li, .mx a.mx-file, .mx a.mx-preview, .mx a.mx-ib { text-decoration: none; color: inherit; }
.mx-sender { font-size: .76em; font-weight: 750; color: var(--ember); margin: 0 0 3px 14px; }
.mx-line { display: flex; align-items: flex-end; gap: 8px; max-width: min(82%, 600px); }
.mx-row.mine .mx-line { flex-direction: row-reverse; }
.mx-gav { width: 30px; flex: none; }
@media (min-width: 900px) { .mx-line { max-width: min(72%, 620px); } }
.mx-b { position: relative; min-width: 0; max-width: 100%; padding: 8px 12px 7px; border-radius: var(--r-b); background: var(--theirs); color: var(--theirs-text); overflow-wrap: anywhere; }
.mx[data-theme="light"] .mx-row:not(.mine) .mx-b { box-shadow: 0 1px 1.5px rgba(16, 18, 26, .14); }
.mx-row.mine .mx-b { background: linear-gradient(168deg, var(--mine-a) 0%, var(--mine-b) 48%, var(--mine-c) 100%); color: var(--mine-text); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 1px 2px rgba(0, 0, 0, .35); }
.mx-row:not(.g-first):not(.mine) .mx-b { border-top-left-radius: 7px; }
.mx-row:not(.g-last):not(.mine) .mx-b { border-bottom-left-radius: 7px; }
.mx-row.mine:not(.g-first) .mx-b { border-top-right-radius: 7px; }
.mx-row.mine:not(.g-last) .mx-b { border-bottom-right-radius: 7px; }
.mx-row.g-last:not(.mine) .mx-b { border-bottom-left-radius: 4px; }
.mx-row.mine.g-last .mx-b { border-bottom-right-radius: 4px; }
.mx-row.g-last .mx-b:not(.art)::after { content: ""; position: absolute; bottom: 0; width: 12px; height: 15px; background: var(--theirs); left: -7px;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 15'%3E%3Cpath d='M12 0v15H1.5C5.5 13.4 9.6 10 12 0z'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 15'%3E%3Cpath d='M12 0v15H1.5C5.5 13.4 9.6 10 12 0z'/%3E%3C/svg%3E") no-repeat 0 0 / 100% 100%; }
.mx-row.mine.g-last .mx-b:not(.art)::after { left: auto; right: -7px; background: var(--mine-c); transform: scaleX(-1); }
.mx-b.art { background: none !important; box-shadow: none !important; padding: 0; }
.mx-b.media { padding: 4px; }
.mx-b.media .mx-tx { padding: 4px 8px 2px; }
.mx-fwd { display: flex; align-items: center; gap: 6px; font-size: .74em; font-style: italic; opacity: .8; margin-bottom: 3px; }
.mx-fwd .mx-ic { width: 15px; height: 15px; }
.mx-quote { display: block; width: 100%; text-align: left; margin: 0 0 6px; padding: 6px 10px; border-left: 3.5px solid var(--ember); border-radius: 10px; background: var(--quote-theirs); font-size: .86em; }
.mx-row.mine .mx-quote { background: var(--quote-mine); border-left-color: rgba(255, 255, 255, .8); }
.mx-quote b { display: block; font-size: .92em; color: var(--ember); }
.mx-row.mine .mx-quote b { color: #fff; }
.mx-quote span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; opacity: .9; }
.mx-tx { display: flex; flex-wrap: wrap; align-items: flex-end; column-gap: 10px; row-gap: 0; }
.mx-txt { flex: 1 1 auto; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.mx-txt.jumbo { font-size: 2.2em; line-height: 1.15; }
.mx-txt a { text-decoration: underline; text-underline-offset: 2px; }
.mx-row:not(.mine) .mx-txt a { color: var(--ember); }
.mx-meta { flex: none; margin-left: auto; display: inline-flex; align-items: center; gap: 4px; font-size: .7em; line-height: 1; padding-top: 6px; color: var(--theirs-2); white-space: nowrap; font-variant-numeric: tabular-nums; }
.mx-row.mine .mx-meta { color: var(--mine-2); }
.mx-meta .mx-ic { width: 16px; height: 16px; }
.mx-meta .tick { width: 19px; height: 16px; }
.mx-meta .tick.read { color: #fff; }
.mx-row:not(.mine) .mx-meta .mx-ic.star, .mx-meta .mx-ic.star { color: var(--warn); }
.mx-meta .bad { color: #fff; font-weight: 750; }
.mx-mediaonly-meta { position: absolute; right: 10px; bottom: 10px; padding: 4px 8px; border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff !important; }
.mx-b.art + .mx-artmeta, .mx-artmeta { font-size: .7em; color: var(--text-3); margin-top: 3px; display: inline-flex; gap: 4px; align-items: center; }
.mx-rx { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; max-width: min(82%, 600px); }
.mx-row.mine .mx-rx { justify-content: flex-end; }
.mx-rxp { display: inline-flex; align-items: center; gap: 5px; min-height: 32px; padding: 2px 10px; border-radius: 999px; background: var(--surface); border: 1.5px solid var(--line); font-size: .9em; }
.mx-rxp.me { border-color: var(--ember); background: color-mix(in srgb, var(--ember) 14%, var(--surface)); }
.mx-rxp small { font-size: .74em; font-weight: 750; color: var(--text-2); }
.mx-state { font-size: .72em; color: var(--text-3); margin: 4px 6px 0; }
.mx-hover { position: absolute; top: 50%; transform: translateY(-50%); display: none; gap: 2px; padding: 3px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); z-index: 4; }
.mx-hover .mx-ib { width: 38px; height: 38px; }
.mx-hover .mx-ic { width: 20px; height: 20px; }
@media (hover: hover) and (pointer: fine) { .mx-line:hover .mx-hover, .mx-hover:focus-within { display: inline-flex; } }
.mx-line { position: relative; }
.mx-row:not(.mine) .mx-hover { left: calc(100% + 6px); }
.mx-row.mine .mx-hover { right: calc(100% + 6px); }
.mx-swipe { position: absolute; top: 50%; left: -38px; transform: translateY(-50%) scale(.6); opacity: 0; color: var(--ember); transition: opacity .1s; }

/* attachments */
.mx-img { display: block; border-radius: 16px; max-height: 440px; width: auto; max-width: 100%; height: auto; cursor: zoom-in; background: var(--steel); min-width: 120px; min-height: 90px; object-fit: cover; }
.mx-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: min(380px, 70vw); }
.mx-grid2 .mx-img { width: 100%; height: 100%; aspect-ratio: 1; max-height: none; min-width: 0; border-radius: 12px; }
.mx-video { display: block; border-radius: 16px; max-height: 440px; max-width: 100%; background: #000; }
.mx-file { display: flex; align-items: center; gap: 12px; min-width: min(260px, 60vw); padding: 8px 6px; text-decoration: none; }
.mx-file .ext { display: grid; place-items: center; width: 46px; height: 54px; border-radius: 10px; background: var(--quote-theirs); font-size: .68em; font-weight: 800; letter-spacing: .02em; flex: none; }
.mx-row.mine .mx-file .ext { background: var(--quote-mine); }
.mx-file .nm { font-weight: 700; overflow-wrap: anywhere; font-size: .92em; }
.mx-file .sz { font-size: .76em; opacity: .8; }
.mx-file .mx-ic { margin-left: auto; opacity: .85; }
.mx-gif { display: block; max-width: min(300px, 64vw); max-height: 300px; border-radius: 16px; }
.mx-emote { display: block; width: 132px; height: 132px; object-fit: contain; }
.mx-sticker { font-size: 3.2em; line-height: 1.1; }
.mx-lock { display: flex; gap: 8px; align-items: flex-start; font-size: .88em; opacity: .9; }
.mx-pvslot { display: block; height: 0; overflow: hidden; }
.mx-preview { display: block; margin: 6px 0 2px; border-radius: 12px; overflow: hidden; background: var(--quote-theirs); text-decoration: none; border-left: 3.5px solid var(--ember); max-width: 420px; }
.mx-row.mine .mx-preview { background: var(--quote-mine); border-left-color: rgba(255, 255, 255, .8); }
.mx-preview img { display: block; width: 100%; max-height: 200px; object-fit: cover; }
.mx-preview .pv { padding: 8px 10px 9px; }
.mx-preview .site { font-size: .72em; opacity: .8; }
.mx-preview .ttl { font-weight: 750; font-size: .9em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mx-preview .dsc { font-size: .8em; opacity: .85; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }

/* voice */
.mx-voice { display: flex; align-items: center; gap: 10px; width: min(330px, 66vw); padding: 2px 0; }
.mx-vplay { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; flex: none; background: var(--ember); color: #fff; }
.mx-row.mine .mx-vplay { background: #fff; color: var(--mine-b); }
.mx-vplay .mx-ic { width: 26px; height: 26px; }
.mx-vplay.pulse { animation: mxpulse 1.3s ease-in-out infinite; }
@keyframes mxpulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 59, 78, .6); } 50% { box-shadow: 0 0 0 12px rgba(255, 59, 78, 0); } }
.mx-vmain { flex: 1; min-width: 0; }
.mx-wave { display: flex; align-items: center; gap: 2px; height: 34px; cursor: pointer; touch-action: none; }
.mx-wave i { flex: 1; min-width: 2px; border-radius: 2px; background: currentColor; opacity: .38; }
.mx-wave i.on { opacity: 1; }
.mx-row:not(.mine) .mx-wave i.on { color: var(--ember); }
.mx-vrow { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: .74em; margin-top: 2px; font-variant-numeric: tabular-nums; }
.mx-speed { min-width: 44px; min-height: 30px; padding: 0 8px; border-radius: 999px; background: var(--quote-theirs); font-weight: 800; font-size: 1em; }
.mx-row.mine .mx-speed { background: var(--quote-mine); }
.mx-playbig { display: inline-flex; align-items: center; gap: 8px; margin: 2px 0 8px; padding: 10px 18px; border-radius: 999px; background: #fff; color: var(--mine-c); font-weight: 800; font-size: 1.05em; }

/* typing + scheduled + failed */
.mx-typing .mx-b { padding: 14px 16px; }
.mx-dots { display: inline-flex; gap: 5px; }
.mx-dots i { width: 9px; height: 9px; border-radius: 50%; background: currentColor; opacity: .35; animation: mxdot 1.2s infinite; }
.mx-dots i:nth-child(2) { animation-delay: .15s; } .mx-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes mxdot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.mx-schedhead { align-self: center; display: flex; align-items: center; gap: 8px; margin: 18px 0 4px; color: var(--text-2); font-size: .78em; font-weight: 700; }
.mx-row.sched .mx-b { background: transparent !important; color: var(--text); border: 2px dashed color-mix(in srgb, var(--ember) 70%, transparent); box-shadow: none !important; cursor: pointer; }
.mx-row.sched .mx-b::after { display: none; }
.mx-row.sched .mx-meta { color: var(--ember); font-weight: 700; }
.mx-row.pending .mx-b { opacity: .78; }
.mx-row.failed .mx-b { box-shadow: 0 0 0 2px var(--warn) !important; cursor: pointer; }

/* jump to latest + drop zone */
.mx-fab { position: absolute; right: 16px; bottom: 14px; z-index: 5; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--surface); border: 1px solid var(--line-2); box-shadow: var(--shadow); color: var(--text); }
.mx-fab .mx-badge { position: absolute; top: -6px; right: -4px; }
.mx-drop { position: absolute; inset: 10px; z-index: 8; display: grid; place-items: center; border: 3px dashed var(--ember); border-radius: 22px; background: color-mix(in srgb, var(--bg) 78%, transparent); font-size: 1.2em; font-weight: 750; pointer-events: none; }

/* ---------- composer */
.mx-compose { flex: none; padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); background: var(--pane); border-top: 1px solid var(--line); }
@media (min-width: 900px) { .mx-compose { padding: 10px 18px 14px; } }
.mx-cin { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 8px; }
.mx-crow { display: flex; align-items: flex-end; gap: 8px; }
.mx-round { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; flex: none; background: var(--steel); color: var(--text); }
.mx-round:hover { background: var(--line); }
.mx-round.send { background: linear-gradient(165deg, var(--mine-a), var(--mine-c)); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25), 0 2px 10px rgba(200, 16, 46, .35); }
.mx-round.send:hover { filter: brightness(1.08); }
.mx-round.rec { background: var(--ember); color: #fff; animation: mxpulse 1.3s infinite; }
.mx-round.plus.open .mx-ic { transform: rotate(45deg); }
.mx-round .mx-ic { transition: transform .15s; }
.mx-input { flex: 1; min-width: 0; display: flex; align-items: flex-end; min-height: 50px; border-radius: 25px; background: var(--steel); padding: 0 4px 0 16px; }
.mx .mx-ta:focus-visible { outline: none; }
.mx-input:focus-within { box-shadow: 0 0 0 2px color-mix(in srgb, var(--ember) 65%, transparent); }
.mx .mx-ta { flex: 1; min-width: 0; width: 100%; display: block; min-height: 50px; max-height: 38vh; padding: 13px 0 12px; line-height: 1.35; overflow-y: auto; color: var(--text); }
.mx .mx-ta::placeholder { color: var(--text-3); opacity: 1; }
.mx-input .mx-ib { width: 40px; height: 42px; margin-bottom: 4px; color: var(--text-2); }
.mx-chip { display: flex; align-items: center; gap: 10px; padding: 8px 6px 8px 12px; border-radius: 14px; background: var(--raised); border-left: 3.5px solid var(--ember); min-width: 0; }
.mx-chip .t { flex: 1; min-width: 0; font-size: .86em; }
.mx-chip .t b { display: block; color: var(--ember); font-size: .92em; }
.mx-chip .t span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.mx-chip .mx-ic.lead { color: var(--ember); }
.mx-tray { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 2px; }
.mx-tile { position: relative; flex: none; width: 92px; height: 92px; border-radius: 14px; overflow: hidden; background: var(--raised); display: grid; place-items: center; text-align: center; }
.mx-tile img, .mx-tile video { width: 100%; height: 100%; object-fit: cover; }
.mx-tile .fn { font-size: .66em; padding: 4px; overflow-wrap: anywhere; color: var(--text-2); }
.mx-tile .x { position: absolute; top: 4px; right: 4px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; display: grid; place-items: center; }
.mx-tile .x .mx-ic { width: 18px; height: 18px; }
.mx-tile .pg { position: absolute; left: 0; bottom: 0; height: 5px; background: var(--ember); width: 0; }
.mx-recbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px 8px 14px; border-radius: 16px; background: var(--raised); }
.mx-recbar .live { width: 12px; height: 12px; border-radius: 50%; background: var(--ember); animation: mxpulse 1.2s infinite; flex: none; }
.mx-recbar .tm { font-weight: 800; font-variant-numeric: tabular-nums; }
.mx-recbar .hint { color: var(--text-2); font-size: .82em; flex: 1; min-width: 8em; }
.mx-level { display: flex; align-items: center; gap: 2px; height: 26px; flex: 1; min-width: 80px; }
.mx-level i { flex: 1; background: var(--ember); border-radius: 2px; min-height: 3px; }
.mx-assist.open { flex-wrap: wrap; overflow: visible; }
.mx-assist .lbl { font-size: .8em; font-weight: 750; color: var(--text-2); width: 100%; }
.mx-assist { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; align-items: center; }
.mx-assist::-webkit-scrollbar { display: none; }
.mx-pill { display: inline-flex; align-items: center; gap: 7px; flex: none; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--raised); border: 1.5px solid var(--line-2); font-size: .86em; font-weight: 700; white-space: nowrap; }
.mx-pill:hover { border-color: var(--ember); }
.mx-pill .mx-ic { width: 19px; height: 19px; color: var(--ember); }
.mx-pill.jarvis { background: linear-gradient(100deg, color-mix(in srgb, var(--crimson) 22%, var(--raised)), var(--raised)); border-color: color-mix(in srgb, var(--ember) 55%, var(--line-2)); }
.mx-pill.on { background: var(--crimson); border-color: var(--crimson); color: #fff; }
.mx-pill.on .mx-ic { color: #fff; }
.mx-jnote { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px 8px 12px; border-radius: 14px; background: color-mix(in srgb, var(--crimson) 14%, var(--raised)); font-size: .84em; }
.mx-jnote .t { flex: 1; min-width: 12em; }
.mx-jnote .mx-ic { color: var(--ember); }
.mx-jnote .acts { display: flex; gap: 6px; flex-wrap: wrap; }
.mx-jnote .mx-pill { min-height: 36px; font-size: .92em; }
.mx-shimmer { background: linear-gradient(90deg, var(--text-2) 0%, var(--text) 40%, var(--text-2) 80%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: mxsh 1.6s linear infinite; }
@keyframes mxsh { to { background-position: -200% 0; } }

/* emoji / GIF / emoticon panel */
.mx-panel { display: flex; flex-direction: column; height: min(44vh, 380px); border-radius: 18px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.mx-tabs { display: flex; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); flex: none; overflow-x: auto; scrollbar-width: none; }
.mx-tab { min-height: 40px; padding: 0 14px; border-radius: 12px; font-weight: 700; font-size: .86em; color: var(--text-2); white-space: nowrap; }
.mx-tab.on { background: var(--steel); color: var(--text); }
.mx-tab.close { margin-left: auto; padding: 0 10px; }
.mx-cats { display: flex; gap: 2px; padding: 4px 6px; border-bottom: 1px solid var(--line); flex: none; overflow-x: auto; scrollbar-width: none; }
.mx-cat { min-width: 42px; min-height: 40px; border-radius: 10px; font-size: 1.15em; opacity: .65; }
.mx-cat.on { opacity: 1; background: var(--steel); }
.mx-pgrid { flex: 1; min-height: 0; overflow-y: auto; padding: 6px; display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); align-content: start; gap: 2px; }
.mx-emo { height: 48px; border-radius: 10px; font-size: 1.6em; line-height: 1; font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif; }
.mx-emo:hover { background: var(--steel); }
.mx-pgrid.lib { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 6px; }
.mx-pgrid.lib.emote { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }
.mx-lib { aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: var(--raised); display: grid; place-items: center; }
.mx-lib img { width: 100%; height: 100%; object-fit: cover; }
.mx-pgrid.emote .mx-lib img { object-fit: contain; padding: 6px; }
.mx-lib.make { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-weight: 750; font-size: .78em; padding: 6px; text-align: center; border: 2px dashed var(--line-2); background: transparent; }
.mx-lib.make .mx-ic { color: var(--ember); width: 30px; height: 30px; }
.mx-plabel { grid-column: 1 / -1; font-size: .74em; font-weight: 750; color: var(--text-3); padding: 8px 6px 2px; }
.mx-pnote { grid-column: 1 / -1; color: var(--text-2); padding: 12px; font-size: .88em; }

/* ---------- sheets, menus, lightbox */
.mx-layer { position: absolute; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; background: rgba(0, 0, 0, .58); animation: mxfade .14s ease-out; }
@media (min-width: 700px) { .mx-layer { align-items: center; padding: 24px; } }
@keyframes mxfade { from { opacity: 0; } }
.mx-sheet { width: min(560px, 100%); max-height: 90%; overflow-y: auto; overscroll-behavior: contain; background: var(--surface); color: var(--text); border-radius: 24px 24px 0 0; padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); box-shadow: var(--shadow); animation: mxup .18s cubic-bezier(.2, .8, .2, 1); }
@media (min-width: 700px) { .mx-sheet { border-radius: 24px; padding-bottom: 18px; } }
@keyframes mxup { from { transform: translateY(24px); opacity: .6; } }
.mx-grab { width: 44px; height: 5px; border-radius: 3px; background: var(--line-2); margin: 4px auto 10px; }
@media (min-width: 700px) { .mx-grab { display: none; } }
.mx-sheet h2 { margin: 6px 4px 12px; font-size: 1.15em; font-weight: 800; }
.mx-sheet .lead { margin: -4px 4px 14px; color: var(--text-2); font-size: .9em; }
.mx-list { display: flex; flex-direction: column; }
.mx-li { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 6px 10px; border-radius: 14px; text-align: left; font-size: 1em; }
.mx-li:hover { background: var(--raised); }
.mx-li .mx-ic { color: var(--text-2); }
.mx-li.danger, .mx-li.danger .mx-ic { color: var(--ember); }
.mx-li .sub { display: block; font-size: .78em; color: var(--text-2); }
.mx-li .grow { flex: 1; min-width: 0; }
.mx-li .val { color: var(--text-2); font-size: .86em; }
.mx-reactrow { display: flex; justify-content: space-between; gap: 4px; padding: 4px 2px 12px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.mx-reactrow button { width: 48px; height: 48px; border-radius: 50%; font-size: 1.55em; font-family: 'Segoe UI Emoji', 'Apple Color Emoji', 'Noto Color Emoji', sans-serif; display: grid; place-items: center; }
.mx-reactrow button:hover, .mx-reactrow button.me { background: var(--steel); }
.mx-reactrow .more { font-family: inherit; font-size: 1em; color: var(--text-2); }
.mx-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 10px; }
.mx-tilebtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 104px; padding: 10px 6px; border-radius: 18px; background: var(--raised); font-size: .84em; font-weight: 700; text-align: center; line-height: 1.15; overflow-wrap: anywhere; }
.mx-tilebtn:hover { background: var(--steel); }
.mx-tilebtn .ring { display: grid; place-items: center; width: 50px; height: 50px; border-radius: 50%; background: var(--steel); color: var(--ember); }
.mx-tilebtn:hover .ring { background: var(--surface); }
.mx-picks { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.mx-pick { display: flex; align-items: center; gap: 14px; min-height: 60px; padding: 8px 14px; border-radius: 16px; background: var(--raised); text-align: left; border: 2px solid transparent; }
.mx-pick:hover { border-color: var(--line-2); }
.mx-pick.on { border-color: var(--ember); }
.mx-pick .mx-ic { color: var(--ember); }
.mx-pick .grow { flex: 1; min-width: 0; }
.mx-pick b { display: block; }
.mx-pick span { font-size: .82em; color: var(--text-2); }
.mx-dt { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 6px 0 12px; }
.mx-dt label { display: flex; flex-direction: column; gap: 6px; font-size: .8em; color: var(--text-2); font-weight: 700; }
.mx .mx-dt input { min-height: 52px; padding: 0 12px; border-radius: 14px; background: var(--raised); border: 1.5px solid var(--line-2); color: var(--text); font-size: 1.1em; width: 100%; }
.mx-note { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 14px; background: var(--raised); font-size: .84em; color: var(--text-2); margin-bottom: 12px; }
.mx-note .mx-ic { color: var(--warn); width: 20px; height: 20px; }
.mx-acts { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; margin-top: 8px; }
.mx-acts .mx-btn { flex: 1 1 auto; }
.mx .mx-text { width: 100%; min-height: 120px; padding: 12px 14px; border-radius: 14px; background: var(--raised); border: 1.5px solid var(--line-2); color: var(--text); line-height: 1.4; }
.mx-sched-it { display: flex; gap: 12px; align-items: flex-start; padding: 12px; border-radius: 16px; background: var(--raised); margin-bottom: 8px; }
.mx-sched-it .grow { flex: 1; min-width: 0; }
.mx-sched-it .when { color: var(--ember); font-weight: 800; font-size: .86em; }
.mx-sched-it .what { overflow-wrap: anywhere; white-space: pre-wrap; margin-top: 2px; }
.mx-sched-it .err { color: var(--warn); font-size: .8em; margin-top: 4px; }
.mx-seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--steel); }
.mx-seg button { flex: 1; min-height: 42px; border-radius: 10px; font-weight: 700; font-size: .86em; color: var(--text-2); }
.mx-seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.mx-switch { position: relative; width: 52px; height: 32px; border-radius: 999px; background: var(--line-2); flex: none; transition: background-color .15s; }
.mx-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.mx-switch.on { background: var(--crimson); }
.mx-switch.on::after { transform: translateX(20px); }

.mx-dhead { display: flex; align-items: center; gap: 8px; min-height: 68px; padding: 8px 8px 8px 16px; border-bottom: 1px solid var(--line); flex: none; }
.mx-dhead h2 { flex: 1; margin: 0; font-size: 1.08em; font-weight: 800; }
.mx-dbody { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; overscroll-behavior: contain; }
.mx-dwho { display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; margin: 4px 0 16px; }
.mx-dwho .nm { font-size: 1.3em; font-weight: 800; }
.mx-dwho .st { color: var(--text-2); font-size: .86em; }
.mx-qa { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 18px; }
.mx-qa button { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 4px; border-radius: 16px; background: var(--raised); font-size: .78em; font-weight: 700; }
.mx-qa .mx-ic { color: var(--ember); }
.mx-sec { margin: 0 0 18px; }
.mx-sec h3 { margin: 0 0 8px 2px; font-size: .82em; font-weight: 800; color: var(--text-2); }
.mx-card { border-radius: 18px; background: var(--raised); padding: 4px; }
.mx-card .mx-li { min-height: 56px; }
.mx-gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; margin-top: 8px; }
.mx-gal button { aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--steel); position: relative; }
.mx-gal img, .mx-gal video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mx-gal .vid { position: absolute; left: 6px; bottom: 6px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .8)); }
.mx-flist .mx-li { min-height: 52px; font-size: .9em; }
.mx-privacy { font-size: .8em; color: var(--text-2); line-height: 1.45; padding: 0 4px; }
.mx-privacy p { margin: 0 0 8px; }
.mx-ver { color: var(--text-3); font-size: .74em; text-align: center; margin: 12px 0 4px; }

.mx-lb { position: absolute; inset: 0; z-index: 60; background: #000; display: flex; flex-direction: column; color: #fff; }
.mx-lbbar { display: flex; align-items: center; gap: 6px; min-height: 64px; padding: 8px 8px 8px 16px; flex: none; background: linear-gradient(#000c, #0000); }
.mx-lbbar .t { flex: 1; min-width: 0; font-size: .86em; color: #ddd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mx-lbbar .mx-ib { color: #fff; }
.mx-lbbar .mx-ib:hover { background: #ffffff22; }
.mx-lbstage { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; touch-action: pan-y; overflow: hidden; }
.mx-lbstage img, .mx-lbstage video { max-width: 100%; max-height: 100%; object-fit: contain; user-select: none; }
.mx-lbnav { position: absolute; top: 50%; transform: translateY(-50%); width: 54px; height: 54px; border-radius: 50%; background: #ffffff1f; color: #fff; display: grid; place-items: center; }
.mx-lbnav.prev { left: 14px; } .mx-lbnav.next { right: 14px; }
@media (pointer: coarse) { .mx-lbnav { display: none; } }

.mx-cam { position: relative; width: 100%; aspect-ratio: 4 / 3; max-height: 52vh; border-radius: 18px; overflow: hidden; background: #000; display: grid; place-items: center; margin-bottom: 12px; }
.mx-cam video, .mx-cam img { width: 100%; height: 100%; object-fit: cover; }
.mx-cam .st { position: absolute; left: 12px; bottom: 12px; padding: 4px 12px; border-radius: 999px; background: rgba(0, 0, 0, .6); color: #fff; font-weight: 750; font-size: .86em; }
.mx-cam .bar { position: absolute; left: 0; top: 0; height: 6px; width: calc(var(--p, 0) * 100%); background: var(--ember); }
.mx .mx-name-in { width: 100%; min-height: 52px; padding: 0 14px; border-radius: 14px; background: var(--raised); border: 1.5px solid var(--line-2); color: var(--text); margin-bottom: 10px; }

.mx-skel { height: 64px; margin: 8px 10px; border-radius: 16px; background: linear-gradient(90deg, var(--raised), var(--steel), var(--raised)); background-size: 200% 100%; animation: mxsk 1.4s linear infinite; }
@keyframes mxsk { to { background-position: -200% 0; } }
.mx-offline { flex: none; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 12px; background: color-mix(in srgb, var(--warn) 20%, var(--pane)); color: var(--text); font-size: .8em; font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .mx *, .mx *::before, .mx *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* =====================================================================================================================
   MatthewMail 0.9.45 chat 2 (owner 2026-10-25 19:01). Matthew emoji everywhere, stickers, polls & co, wallpapers, big text.
   ===================================================================================================================== */
/* the composer's emoji font: EMPTY glyphs 1.25 em wide for every emoji code point (tools/make_blank_font.py), so the phone never paints its own
   emoji in the text box; chat-x.js draws the Matthew emoji on top (mirror layer) */
@font-face { font-family: 'MMoji Blank'; font-style: normal; font-weight: 100 900; font-display: block; src: url(/app/fonts/mmoji-blank.woff2) format('woff2');
  unicode-range: U+200D, U+20E3, U+231A-231B, U+23E9-23EC, U+23F0-23F3, U+25FD-25FE, U+2600-2604, U+260E, U+2614-2615, U+2618, U+261D, U+2620, U+2622-2623, U+2626, U+262A, U+262E-262F, U+2638-263A, U+2648-2653, U+265F-2660, U+2663, U+2665-2666, U+2668, U+267B, U+267E-267F, U+2692-2697, U+2699, U+269B-269C, U+26A0-26A1, U+26AA-26AB, U+26B0-26B1, U+26BD-26BE, U+26C4-26C5, U+26C8, U+26CE-26CF, U+26D1, U+26D3-26D4, U+26E9-26EA, U+26F0-26F5, U+26F7-26FA, U+26FD, U+2702, U+2705, U+2708-270D, U+270F, U+2712, U+271D, U+2721, U+2728, U+2744, U+274C, U+274E, U+2753-2755, U+2757, U+2763-2764, U+2795-2797, U+27B0, U+27BF, U+2B1B-2B1C, U+2B50, U+2B55, U+3297, U+3299, U+FE0E-FE0F, U+1F000-1FAFF, U+E0020-E007F, U+F0000-F00FF; }
.mx[data-size="largest"] { --fs: 24px; }
.mx[data-contrast="high"] { --text-2: #D9D7DE; --text-3: #BDBBC3; --line: #4C4C57; --line-2: #6A6A76; --theirs: #2B2B33; }
.mx[data-theme="light"][data-contrast="high"] { --text-2: #2E3036; --text-3: #3D4048; --line: #A9AEB8; --line-2: #8D939E; }
.mx[data-motion="reduce"] *, .mx[data-motion="reduce"] *::before, .mx[data-motion="reduce"] *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }

/* ---------- Matthew emoji in text */
.mx img.mmoji { --mmoji-size: 1.3em; width: var(--mmoji-size); height: var(--mmoji-size); vertical-align: -.28em; object-fit: contain; margin: 0 .02em; max-width: none; }
.mx img.mmoji.mmoji-xxl { width: calc(var(--mmoji-size) * var(--mmoji-scale, 4)); height: auto; aspect-ratio: 1 / 1; max-width: 100%; vertical-align: -.45em; }
.mx .mmoji-wait { display: inline-block; width: 1.3em; height: 1.3em; vertical-align: -.28em; border-radius: 40%; background: color-mix(in srgb, var(--text) 10%, transparent); }
.mx-txt.jumbo { --jb: 64px; line-height: 1.1; font-size: 1em; padding: 2px 0; }
.mx-txt.jumbo.n1 { --jb: 88px; } .mx-txt.jumbo.n2 { --jb: 72px; } .mx-txt.jumbo.n3 { --jb: 60px; }
.mx-txt.jumbo img.mmoji.mmoji-big { width: var(--jb); height: var(--jb); vertical-align: middle; margin: 0 2px; }
.mx-txt.jumbo img.mmoji.mmoji-big.mmoji-xxl { width: min(calc(var(--jb) * var(--mmoji-scale, 4)), 100%); height: auto; }
.mx-txt.jumbo.anim-beat img.mmoji-big { animation: mxbeat 1.15s ease-in-out 3; }
.mx-txt.jumbo.anim-wobble img.mmoji-big { animation: mxwob 1.4s ease-in-out 2; }
.mx-txt.jumbo.anim-pop img.mmoji-big { animation: mxpop .7s cubic-bezier(.2, 1.6, .4, 1) 1; }
.mx-txt.jumbo.anim-bob img.mmoji-big { animation: mxbob 1.6s ease-in-out 2; }
@keyframes mxbeat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.18); } 30% { transform: scale(.96); } 45% { transform: scale(1.1); } }
@keyframes mxwob { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg); } 75% { transform: rotate(9deg); } }
@keyframes mxpop { from { transform: scale(.3); opacity: 0; } }
@keyframes mxbob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.mx-room .mx-rname img.mmoji, .mx-rprev img.mmoji { --mmoji-size: 1.15em; vertical-align: -.24em; }
.mx-room img.mmoji.mmoji-xxl, .mx-chip img.mmoji.mmoji-xxl, .mx-pinbar img.mmoji.mmoji-xxl, .mx-quote img.mmoji.mmoji-xxl, .mx-result img.mmoji.mmoji-xxl { --mmoji-scale: 1; }

/* ---------- composer: textarea + mirror layer */
.mx-tawrap { position: relative; flex: 1; min-width: 0; display: flex; }
.mx .mx-ta { font-family: 'MMoji Blank', 'Atkinson Next', 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; scrollbar-width: none; background: transparent; position: relative; z-index: 0; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; }
.mx .mx-ta::-webkit-scrollbar { display: none; }
.mx-tamirror { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; color: transparent; font-family: 'MMoji Blank', 'Atkinson Next', 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: inherit; line-height: 1.35; padding: 13px 0 12px; white-space: pre-wrap; overflow-wrap: break-word; word-break: normal; }
.mx-tamirror:empty { display: none; }
.mx-tamirror .slot { position: relative; }
.mx-tamirror .slot > img { position: absolute; left: 50%; top: 50%; width: 1.25em; height: 1.25em; transform: translate(-50%, -52%); max-width: none; }
.mx-tamirror .slot.cover > img { background: var(--steel); border-radius: 30%; box-shadow: 0 0 0 3px var(--steel); }
.mx-tamirror .chip { position: absolute; inset: -.05em -.15em; display: flex; align-items: center; gap: .2em; padding: 0 .3em 0 .1em; border-radius: .5em; background: var(--steel); color: var(--text); font-size: .9em; overflow: hidden; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--line-2); }
.mx-tamirror .chip img { width: 1.3em; height: 1.3em; flex: none; }
.mx-tamirror .chip span { overflow: hidden; text-overflow: ellipsis; }
.mx-input .mx-ib.on { color: var(--ember); }

/* ---------- the expression panel (OWN-01: every tab is ONE scrolling grid whose rows size to their content) */
.mx-panel { position: relative; display: flex; flex-direction: column; height: clamp(220px, calc(var(--mx-vvh, 100vh) * .42), 400px); max-height: calc(var(--mx-vvh, 100vh) - 200px); min-height: 180px;
  border-radius: 20px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; box-shadow: 0 -6px 24px rgba(0, 0, 0, .25); }
.mx-panel.insheet { height: min(62vh, 520px); max-height: none; border: 0; box-shadow: none; background: transparent; }
@media (min-width: 900px) { .mx-panel { height: min(440px, calc(var(--mx-vvh, 100vh) * .5)); } }
.mx-pbar { display: flex; align-items: center; gap: 6px; padding: 8px 8px 4px; flex: none; }
.mx-psearch { flex: 1; min-height: 44px; border-radius: 12px; }
.mx-psearch input { height: 42px; }
.mx-tonebtn img { width: 30px; height: 30px; }
.mx-pscroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; scroll-behavior: auto; padding: 0 6px 10px; }
.mx-pscroll > .mx-pgrid { flex: none; overflow: visible; min-height: 0; padding: 4px 0; }
.mx-pgrid, .mx-pgrid.lib { grid-auto-rows: max-content; align-content: start; }
.mx-esec { content-visibility: auto; contain-intrinsic-size: auto 260px; }
.mx-esec .mx-plabel { position: sticky; top: 0; z-index: 1; background: var(--surface); margin: 0; padding: 10px 4px 6px; font-size: .74em; font-weight: 800; color: var(--text-3); letter-spacing: .02em; }
.mx-egrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); grid-auto-rows: 46px; grid-auto-flow: row dense; gap: 2px; }
.mx-eres { padding-top: 6px; }
.mx .mx-emo { height: auto; min-height: 46px; display: grid; place-items: center; border-radius: 12px; font-family: inherit; font-size: 1em; padding: 0; }
.mx-emo img { width: 34px; height: 34px; pointer-events: none; }
.mx-emo:hover, .mx-emo:focus-visible { background: var(--steel); }
.mx-emo:active img { transform: scale(.88); }
.mx-emo.xl { grid-column: span 2; grid-row: span 2; }
.mx-emo.xl img { width: 84px; height: 84px; }
.mx-epair { grid-column: span 4; grid-row: span 2; display: flex; gap: 2px; }
.mx-epair > .mx-emo { flex: 1; grid-column: auto; grid-row: auto; }
.mx-emo.on { background: var(--steel); box-shadow: inset 0 0 0 2px var(--ember); }
.mx-cats { gap: 2px; padding: 2px 6px 4px; }
.mx .mx-cat { min-width: 44px; min-height: 42px; display: grid; place-items: center; opacity: .6; font-size: 1em; border-radius: 10px; }
.mx-cat img { width: 26px; height: 26px; }
.mx-cat .mx-ic { width: 22px; height: 22px; }
.mx-cat.on { opacity: 1; background: var(--steel); }
.mx-tonepop { position: absolute; z-index: 5; display: flex; gap: 2px; padding: 6px; border-radius: 16px; background: var(--raised); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
.mx-tonepop .mx-emo { flex: 1; min-height: 48px; }
.mx-chiprow { display: flex; gap: 6px; padding: 2px 8px 6px; flex: none; overflow-x: auto; scrollbar-width: none; align-items: center; }
.mx-chiprow::-webkit-scrollbar { display: none; }
.mx-chiprow.list { padding: 0 14px 8px; }
.mx-chipb { display: inline-flex; align-items: center; gap: 6px; flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; background: var(--raised); border: 1.5px solid var(--line); font-weight: 700; font-size: .82em; color: var(--text-2); white-space: nowrap; }
.mx-chipb .mx-ic { width: 18px; height: 18px; }
.mx-chipb.on { background: color-mix(in srgb, var(--ember) 18%, var(--raised)); border-color: var(--ember); color: var(--text); }
.mx-chipb small { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--crimson); color: #fff; font-size: .82em; display: inline-grid; place-items: center; }
.mx-chiplbl { font-size: .76em; font-weight: 800; color: var(--text-3); flex: none; }
.mx-pgrid.lib { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 6px; }
.mx-pgrid.lib.sticker, .mx-pgrid.lib.emote { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
.mx-lib { position: relative; }
.mx-pgrid.sticker .mx-lib { background: transparent; }
.mx-pgrid.sticker .mx-lib:hover, .mx-pgrid.emote .mx-lib:hover { background: var(--raised); }
.mx-pgrid.sticker .mx-lib img, .mx-pgrid.emote .mx-lib img { object-fit: contain; padding: 6px; }
.mx-lib img { pointer-events: none; -webkit-user-drag: none; }
.mx-lib:active { transform: scale(.96); }
.mx-libfav { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: var(--warn); display: grid; place-items: center; }
.mx-libfav .mx-ic { width: 14px; height: 14px; }
.mx-libfav .mx-ic svg { fill: currentColor; }
.mx-libprev { display: grid; place-items: center; margin: 0 auto 8px; }
.mx-libprev img { max-height: 40vh; max-width: 100%; border-radius: 16px; }
.mx-libprev.sticker img, .mx-libprev.emote img { max-height: 220px; border-radius: 0; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .35)); }
.mx-pnote.small { font-size: .76em; color: var(--text-3); padding: 8px 4px; }

/* ---------- list: filters, badges, archived */
.mx-badge.at { background: var(--ember); min-width: 24px; font-size: .8em; }
.mx-badge.dot { min-width: 14px; width: 14px; height: 14px; padding: 0; }
.mx-badge.muted { background: var(--line-2); }
.mx-rprev .pv { display: inline-flex; align-items: center; gap: 4px; min-width: 0; overflow: hidden; }
.mx-rprev .pv > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-rprev .pvic, .mx-pinbar .pvic, .mx-chip .pvic { width: 17px; height: 17px; flex: none; opacity: .85; }
.mx-rprev .draft { color: var(--ember); font-weight: 750; }
.mx-rprev .locked { display: inline-flex; align-items: center; gap: 5px; color: var(--text-3); font-style: italic; }
.mx-rprev .locked .mx-ic { width: 16px; height: 16px; }
.mx-av.notes { background: linear-gradient(160deg, #3a3a46, #1d1d24) !important; color: var(--ember); }
.mx-av.notes .mx-ic { width: 52%; height: 52%; }
.mx-archrow { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 64px; padding: 8px 10px; border-radius: 16px; color: var(--text-2); font-weight: 700; text-align: left; margin-top: 4px; }
.mx-archrow:hover { background: var(--raised); }
.mx-archrow .ring { display: grid; place-items: center; width: 54px; height: 40px; flex: none; color: var(--text-2); }
.mx-archrow .grow { flex: 1; }
.mx-archrow .n { color: var(--text-3); font-size: .86em; }
.mx-archhead { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; width: 100%; padding: 10px 8px 14px; text-align: left; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.mx-archhead span { flex-basis: 100%; font-size: .78em; color: var(--text-3); padding-left: 34px; }
.mx-empty.small { padding: 24px 16px; }

/* ---------- header bits */
.mx-hooks { display: inline-flex; align-items: center; }
.mx-status .flag { display: inline-flex; flex: none; }
.mx-status .flag .mx-ic { width: 16px; height: 16px; }
.mx-infobar { flex: none; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 12px; background: var(--pane); color: var(--text-2); font-size: .8em; border-bottom: 1px solid var(--line); }
.mx-fab.at { bottom: 76px; font-weight: 900; font-size: 1.2em; color: var(--ember); }

/* ---------- bubbles: rich text, mentions, cards */
.mx-txt strong { font-weight: 800; }
.mx-txt em { font-style: italic; }
.mx-code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: .88em; padding: 1px 5px; border-radius: 6px; background: var(--quote-theirs); }
.mx-row.mine .mx-code, .mx-row.mine .mx-pre { background: var(--quote-mine); }
.mx-pre { margin: 4px 0; padding: 8px 10px; border-radius: 10px; background: var(--quote-theirs); font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: .84em; white-space: pre-wrap; overflow-wrap: anywhere; }
.mx-bq { margin: 2px 0 4px; padding: 2px 0 2px 10px; border-left: 3px solid var(--ember); opacity: .9; }
.mx-row.mine .mx-bq { border-left-color: rgba(255, 255, 255, .75); }
.mx-list-md { margin: 2px 0 4px; padding-left: 1.3em; }
.mx-list-md li { margin: 1px 0; }
.mx-spoiler { border-radius: 6px; background: currentColor; color: inherit; cursor: pointer; filter: blur(0); transition: background-color .2s; }
.mx-spoiler:not(.shown) { color: transparent; background: color-mix(in srgb, var(--text) 55%, transparent); }
.mx-spoiler:not(.shown) * { visibility: hidden; }
.mx-spoiler.shown { background: transparent; cursor: text; }
.mx-mention { font-weight: 800; color: var(--focus); }
.mx-row.mine .mx-mention { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.mx-mention.me { background: color-mix(in srgb, var(--ember) 22%, transparent); color: var(--theirs-text); border-radius: 6px; padding: 0 3px; }   /* rc6 a11y: was --focus on the tint = 4.48:1 dark / 3.98:1 light (AA needs 4.5); now 10.4 / 12.2 */
.mx-row.mentioned .mx-b { box-shadow: inset 3px 0 0 var(--ember); }
.mx-link { text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere; }
.mx-edited { font: inherit; color: inherit; text-decoration: underline dotted; text-underline-offset: 2px; padding: 0; }
.mx-b.card { padding: 10px; min-width: min(300px, 72vw); }
.mx-b.card.call { min-width: 0; }
.mx-card2 { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.mx-c2head { display: flex; align-items: center; gap: 6px; font-size: .74em; font-weight: 800; letter-spacing: .02em; opacity: .8; text-transform: uppercase; }
.mx-c2head .mx-ic { width: 16px; height: 16px; }
.mx-c2title { font-weight: 800; font-size: 1.04em; line-height: 1.25; overflow-wrap: anywhere; }
.mx-c2sub { display: flex; align-items: center; gap: 6px; font-size: .84em; opacity: .9; }
.mx-c2sub .mx-ic { width: 17px; height: 17px; flex: none; }
.mx-c2note { font-size: .88em; opacity: .9; white-space: pre-wrap; }
.mx-c2foot { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; font-size: .78em; opacity: .85; margin-top: 2px; }
.mx-linkbtn { font: inherit; font-weight: 800; color: var(--ember); padding: 4px 0; min-height: 32px; }
.mx-row.mine .mx-linkbtn { color: #fff; text-decoration: underline; text-underline-offset: 2px; }
.mx-linkbtn.danger { color: var(--ember); }
.mx-popt { position: relative; display: flex; align-items: center; gap: 10px; width: 100%; min-height: 48px; padding: 6px 12px; border-radius: 12px; overflow: hidden; text-align: left; background: var(--quote-theirs); border: 1.5px solid transparent; }
.mx-row.mine .mx-popt { background: var(--quote-mine); }
.mx-popt .mx-pfill { position: absolute; inset: 0 auto 0 0; width: var(--w, 0%); background: color-mix(in srgb, var(--ember) 30%, transparent); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.mx-row.mine .mx-popt .mx-pfill { background: rgba(255, 255, 255, .22); }
.mx-popt > :not(.mx-pfill) { position: relative; }
.mx-popt .tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid currentColor; display: grid; place-items: center; flex: none; opacity: .75; }
.mx-popt.on .tick { background: var(--ember); border-color: var(--ember); color: #fff; opacity: 1; }
.mx-row.mine .mx-popt.on .tick { background: #fff; border-color: #fff; color: var(--mine-c); }
.mx-popt .tick .mx-ic { width: 15px; height: 15px; }
.mx-popt .lbl { flex: 1; min-width: 0; font-weight: 650; overflow-wrap: anywhere; }
.mx-popt .num { font-weight: 800; font-variant-numeric: tabular-nums; font-size: .9em; }
.mx-popt.on { border-color: color-mix(in srgb, var(--ember) 60%, transparent); }
.mx-pwho { font-size: .72em; opacity: .75; margin: -2px 0 2px 12px; }
.mx-card2.mx-event { flex-direction: row; flex-wrap: wrap; align-items: flex-start; gap: 12px; }
.mx-evdate { display: grid; place-items: center; width: 58px; flex: none; border-radius: 14px; overflow: hidden; background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.mx-evdate b { width: 100%; text-align: center; background: var(--crimson); color: #fff; font-size: .7em; padding: 3px 0; letter-spacing: .06em; }
.mx-evdate span { font-size: 1.6em; font-weight: 900; padding: 2px 0 4px; }
.mx-evbody { flex: 1; min-width: 160px; display: flex; flex-direction: column; gap: 4px; }
.mx-rsvps { display: flex; gap: 6px; flex-basis: 100%; }
.mx-rsvp { flex: 1; min-height: 42px; border-radius: 12px; font-weight: 800; font-size: .86em; background: var(--quote-theirs); border: 1.5px solid transparent; }
.mx-row.mine .mx-rsvp { background: var(--quote-mine); }
.mx-rsvp.on.going { background: #17924F; color: #fff; } .mx-rsvp.on.maybe { background: #B7791F; color: #fff; } .mx-rsvp.on.no { background: #5B6270; color: #fff; }
.mx-event .mx-c2foot { flex-basis: 100%; }
.mx-citem { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 4px 6px; border-radius: 10px; text-align: left; }
.mx-citem:hover { background: var(--quote-theirs); }
.mx-citem .box { width: 24px; height: 24px; border-radius: 7px; border: 2px solid currentColor; display: grid; place-items: center; flex: none; opacity: .8; }
.mx-citem.done .box { background: var(--online); border-color: var(--online); color: #fff; opacity: 1; }
.mx-citem .box .mx-ic { width: 16px; height: 16px; }
.mx-citem .lbl { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.mx-citem.done .lbl { text-decoration: line-through; opacity: .65; }
.mx-citem .by { font-size: .72em; opacity: .7; }
.mx .mx-cadd { width: 100%; min-height: 42px; padding: 0 10px; border-radius: 10px; background: var(--quote-theirs); color: inherit; }
.mx-row.mine .mx-cadd { background: var(--quote-mine); }
.mx-cadd::placeholder { color: inherit; opacity: .6; }
.mx-map { position: relative; height: 150px; border-radius: 12px; overflow: hidden; background: #1b2530; }
.mx-map.big { height: min(42vh, 280px); margin-bottom: 10px; }
.mx-map .tiles { position: absolute; left: 0; top: 0; width: 768px; height: 768px; }
.mx-map .tiles img { position: absolute; width: 256px; height: 256px; max-width: none; }
.mx-mappin { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -22px 0 0 -11px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--crimson); box-shadow: 0 0 0 3px #fff, 0 3px 10px rgba(0, 0, 0, .5); }
.mx-loc.live .mx-mappin { animation: mxpulse 1.6s infinite; }
.mx-map .mx-pnote { position: absolute; inset: 0; display: grid; place-items: center; color: #cfd6de; text-align: center; }
.mx-locrow { display: flex; align-items: center; gap: 10px; }
.mx-locrow .grow { flex: 1; min-width: 0; }
.mx-locrow .mx-btn { min-height: 40px; padding: 0 12px; font-size: .84em; }
.mx-livedot { width: 9px; height: 9px; border-radius: 50%; background: var(--online); flex: none; animation: mxpulse 1.4s infinite; }
.mx-ctop { display: flex; align-items: center; gap: 10px; }
.mx-ctop .grow { flex: 1; min-width: 0; }
.mx a.mx-cline, .mx-cline { display: flex; align-items: center; gap: 8px; min-height: 36px; font-size: .9em; text-decoration: none; overflow-wrap: anywhere; }
.mx-cline .mx-ic { width: 18px; height: 18px; opacity: .8; }
.mx-card2.mx-call { flex-direction: row; align-items: center; gap: 12px; }
.mx-callic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--quote-theirs); flex: none; }
.mx-row.mine .mx-callic { background: var(--quote-mine); }
.mx-call.missed .mx-callic { color: var(--ember); }
.mx-call .grow { flex: 1; min-width: 0; }
.mx-call .mx-btn { min-height: 40px; padding: 0 12px; font-size: .84em; }
.mx-sys { display: inline-flex; align-items: center; gap: 6px; }
.mx-sys .mx-ic { width: 16px; height: 16px; }
.mx-stk { display: block; width: 168px; height: 168px; object-fit: contain; filter: drop-shadow(0 3px 8px rgba(0, 0, 0, .3)); cursor: pointer; }
@media (min-width: 900px) { .mx-stk { width: 190px; height: 190px; } }
.mx-grid2.more .mx-gmore { position: relative; cursor: zoom-in; }
.mx-gmore span { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .5); color: #fff; font-size: 1.6em; font-weight: 900; border-radius: 12px; pointer-events: none; }
.mx-gmore .mx-img { width: 100%; height: 100%; }
.mx-once { display: flex; align-items: center; gap: 12px; min-width: min(250px, 66vw); padding: 6px 4px; text-align: left; }
.mx-once .ring { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 2.5px dashed currentColor; flex: none; }
.mx-once .ring.live { border-style: solid; background: var(--ember); border-color: var(--ember); color: #fff; }
.mx-row.mine .mx-once .ring.live { background: #fff; color: var(--mine-c); border-color: #fff; }
.mx-once b { display: block; }
.mx-once span { font-size: .8em; opacity: .85; }
.mx-once.done { opacity: .7; }
.mx-lb.once img, .mx-lb.once video { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.mx-lbbar .t .mx-ic { width: 18px; height: 18px; vertical-align: -3px; }
.mx-vnote { position: relative; width: 220px; height: 220px; border-radius: 50%; overflow: hidden; padding: 0; background: #000; box-shadow: 0 0 0 3px color-mix(in srgb, var(--ember) 70%, transparent); display: block; }
.mx-vnote video { width: 100%; height: 100%; object-fit: cover; }
.mx-vnote .snd { position: absolute; right: 14px; bottom: 14px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; }
.mx-vnote .snd .mx-ic { width: 17px; height: 17px; }
.mx-vnote.live .snd { display: none; }
.mx-vnote.live { box-shadow: 0 0 0 3px var(--online); }
.mx-trans { margin-top: 6px; padding: 8px 10px; border-radius: 12px; background: var(--quote-theirs); font-size: .86em; }
.mx-row.mine .mx-trans { background: var(--quote-mine); }
.mx-trans .lbl { display: flex; align-items: center; gap: 6px; font-size: .78em; font-weight: 800; opacity: .8; margin-bottom: 2px; }
.mx-trans .lbl .mx-ic { width: 15px; height: 15px; }
.mx-trans .txt { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.mx-trans.open .txt { display: block; }
.mx-trans .mx-linkbtn { min-height: 28px; font-size: .9em; }
.mx-trbtn, .mx-fxlbl { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; padding: 4px 10px; min-height: 32px; border-radius: 999px; font-size: .76em; font-weight: 750; background: var(--quote-theirs); }
.mx-row.mine .mx-trbtn, .mx-row.mine .mx-fxlbl { background: var(--quote-mine); }
.mx-trbtn .mx-ic, .mx-fxlbl .mx-ic { width: 15px; height: 15px; }
.mx-hi { display: flex; gap: 10px; justify-content: center; }
.mx-hib { width: 76px; height: 76px; border-radius: 22px; background: var(--raised); display: grid; place-items: center; }
.mx-hib:hover { background: var(--steel); }
.mx-hib img.mmoji { --mmoji-size: 48px; }
.mx-hib img.mmoji.mmoji-xxl { --mmoji-scale: 1; }
.mx-rxp img.mmoji { --mmoji-size: 22px; vertical-align: middle; margin: 0; }
.mx-rxp img.mmoji.mmoji-xxl { --mmoji-scale: 3; }
.mx-reactrow { gap: 2px; }
.mx-reactrow button img.mmoji { --mmoji-size: 34px; vertical-align: middle; }
.mx-reactrow button img.mmoji.mmoji-xxl { --mmoji-scale: 1; }
.mx-reactrow button:active img { transform: scale(.85); }
.mx-row { content-visibility: auto; contain-intrinsic-size: auto 72px; }
.mx-row.mx-typing, .mx-row.pending, .mx-row.failed, .mx-row.sched { content-visibility: visible; }
.mx-artmeta .mx-edited { font-size: 1em; }

/* ---------- effects */
canvas.mx-fx { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 90; pointer-events: none; }
.mx-burst { position: fixed; z-index: 95; width: 0; height: 0; pointer-events: none; }
.mx-burst .b { position: absolute; left: -16px; top: -16px; width: 32px; height: 32px; animation: mxburst 1s cubic-bezier(.2, .7, .3, 1) forwards; }
.mx-burst .b img { width: 32px; height: 32px; }
@keyframes mxburst { 0% { transform: rotate(var(--a)) translateY(0) scale(.4); opacity: 1; } 70% { opacity: 1; } 100% { transform: rotate(var(--a)) translateY(calc(-1 * var(--d))) scale(1.1); opacity: 0; } }

/* ---------- composer helpers */
.mx-suggest { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding: 4px; border-radius: 16px; background: var(--raised); border: 1px solid var(--line); }
.mx-suggest::-webkit-scrollbar { display: none; }
.mx-sug { display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 44px; padding: 0 12px 0 6px; border-radius: 12px; font-weight: 700; font-size: .9em; }
.mx-sug:hover, .mx-sug:focus-visible { background: var(--steel); }
.mx-sug.emo { padding: 0 6px; }
.mx-sug.emo img { width: 34px; height: 34px; }
.mx-sug.x { margin-left: auto; color: var(--text-3); padding: 0 8px; }
.mx-fmt { display: flex; align-items: center; gap: 2px; padding: 3px; border-radius: 16px; background: var(--raised); border: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.mx-fmt .mx-ib { width: 42px; height: 42px; }
.mx-fmtnote { font-size: .72em; color: var(--text-3); margin: 0 6px; white-space: nowrap; }
@media (max-width: 480px) { .mx-fmtnote { display: none; } }
.mx-optchip { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border-radius: 14px; background: color-mix(in srgb, var(--ember) 14%, var(--raised)); border-left: 3.5px solid var(--ember); font-size: .84em; font-weight: 700; }
.mx-optchip .t { flex: 1; }
.mx-optchip .mx-ic { color: var(--ember); }
.mx-trayopts { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.mx-traynote { font-size: .76em; color: var(--text-3); }
.mx-tile .ed { position: absolute; left: 4px; bottom: 9px; width: 30px; height: 30px; border-radius: 50%; background: rgba(0, 0, 0, .65); color: #fff; display: grid; place-items: center; }
.mx-tile .ed .mx-ic { width: 16px; height: 16px; }
.mx-recbar.paused .live { animation: none; background: var(--warn); }
.mx-recbar .mx-btn { min-height: 42px; padding: 0 12px; }
.mx-fxgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-bottom: 6px; }
.mx-fxb { min-height: 52px; border-radius: 14px; background: var(--raised); font-weight: 750; font-size: .86em; border: 2px solid transparent; }
.mx-fxb:hover { border-color: var(--line-2); }
.mx-fxb.on { border-color: var(--ember); background: color-mix(in srgb, var(--ember) 16%, var(--raised)); }
.mx-h3 { margin: 16px 4px 8px; font-size: .84em; font-weight: 800; color: var(--text-2); }
.mx-lbl2 { display: flex; align-items: center; gap: 8px; margin: 12px 2px 6px; font-size: .82em; font-weight: 800; color: var(--text-2); }
.mx-lbl2 .mx-ic { width: 18px; height: 18px; }

/* ---------- sheets: inputs, pins, cards creators */
.mx .mx-in { width: 100%; min-height: 52px; padding: 0 14px; border-radius: 14px; background: var(--raised); border: 1.5px solid var(--line-2); color: var(--text); margin-bottom: 10px; }
.mx .mx-in:focus { border-color: var(--ember); }
.mx .mx-in.mx-pin { text-align: center; font-size: 1.6em; letter-spacing: .4em; font-variant-numeric: tabular-nums; }
.mx-err { color: var(--ember); font-weight: 700; font-size: .86em; min-height: 1.2em; margin: 0 4px 6px; text-align: center; }
.mx-lockhead { display: grid; place-items: center; width: 72px; height: 72px; margin: 6px auto 4px; border-radius: 50%; background: color-mix(in srgb, var(--ember) 18%, var(--raised)); color: var(--ember); }
.mx-lockhead .mx-ic { width: 36px; height: 36px; }
.mx-shead { display: flex; align-items: center; gap: 12px; margin: 4px 4px 10px; }
.mx-shead h2 { margin: 0 !important; }
.mx-optlist { display: flex; flex-direction: column; gap: 0; }
.mx-optrow { display: flex; align-items: center; gap: 4px; }
.mx-optrow .mx-in { margin-bottom: 8px; }
.mx-optrow .mx-ib { margin-bottom: 8px; }
.mx-label { margin: 8px 4px 6px; font-size: .8em; font-weight: 800; color: var(--text-2); }
.mx-sheet .lead.small { font-size: .78em; }
.mx-li.on { background: color-mix(in srgb, var(--ember) 12%, transparent); }
.mx-li .chev { width: 18px; height: 18px; opacity: .6; }
.mx-li .tickmark { visibility: hidden; color: var(--ember); }
.mx-li.on .tickmark { visibility: visible; }
.mx-card.pad { padding: 10px; }
.mx-card .mx-li { min-height: 58px; }
.mx-sheet.tall { width: min(640px, 100%); }
.mx-layer.full { padding: 0; align-items: stretch; }
.mx-sheet.full { width: 100%; max-width: 760px; max-height: 100%; height: 100%; border-radius: 0; padding-top: calc(8px + env(safe-area-inset-top)); display: flex; flex-direction: column; }
@media (min-width: 700px) { .mx-layer.full { padding: 24px; align-items: center; } .mx-sheet.full { height: min(86vh, 900px); border-radius: 24px; } }
.mx-gsbar { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.mx-gsbar .mx-field { flex: 1; }
.mx-gres { flex: 1; min-height: 0; overflow-y: auto; margin: 0 -16px; border-top: 1px solid var(--line); }
.mx-result .mx-rrow { display: flex; gap: 8px; align-items: flex-start; margin-top: 3px; }
.mx-result .mx-rrow .k { width: 18px; height: 18px; flex: none; color: var(--ember); margin-top: 2px; }
.mx-result .tr { display: flex; align-items: center; gap: 6px; font-size: .74em; color: var(--text-3); margin-top: 3px; }
.mx-result .tr .mx-ic { width: 14px; height: 14px; }
.mx-datein { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.mx-hist { padding: 4px 12px; }
.mx-histit { padding: 8px 0; border-bottom: 1px solid var(--line); }
.mx-histit:last-child { border-bottom: 0; }
.mx-histit .when { font-size: .74em; color: var(--text-3); font-weight: 700; }
.mx-histit .txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.mx-wnhead { text-align: center; margin: 4px 0 10px; }
.mx-wnhead img { width: 64px; height: 64px; border-radius: 50%; box-shadow: 0 0 22px rgba(200, 16, 46, .45); }
.mx-wnhead h2 { margin: 8px 0 2px !important; }
.mx-wnhead p { margin: 0; color: var(--text-3); font-size: .8em; }
.mx-wnlist { display: flex; flex-direction: column; gap: 4px; margin-bottom: 14px; }
.mx-wn { display: flex; gap: 12px; align-items: flex-start; padding: 8px 4px; }
.mx-wn .ring { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: color-mix(in srgb, var(--ember) 16%, var(--raised)); color: var(--ember); flex: none; }
.mx-wn b { display: block; }
.mx-wn span { font-size: .84em; color: var(--text-2); }
.mx-tiles { grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; }
.mx-tilebtn { min-height: 96px; font-size: .8em; }
.mx-tilebtn.c2 .ring { color: #2EC4B6; } .mx-tilebtn.c3 .ring { color: #FFB020; } .mx-tilebtn.c4 .ring { color: #9B7BFF; }
.mx[data-theme="light"] .mx-tilebtn.c2 .ring { color: #0E8A7E; } .mx[data-theme="light"] .mx-tilebtn.c3 .ring { color: #B26A00; } .mx[data-theme="light"] .mx-tilebtn.c4 .ring { color: #6A47E0; }
.mx-picks .mx-pick[disabled] { opacity: .5; }
.mx-pnote { color: var(--text-2); }

/* ---------- photo editor, sticker maker, video note recorder */
.mx-edstage, .mx-stkstage { display: grid; place-items: center; background: repeating-conic-gradient(#2a2a30 0 25%, #1f1f25 0 50%) 0 0 / 22px 22px; border-radius: 16px; padding: 8px; margin-bottom: 10px; touch-action: none; }
.mx-edcv { max-width: 100%; max-height: 52vh; border-radius: 6px; touch-action: none; cursor: crosshair; }
.mx-stkcv { width: min(320px, 76vw); height: auto; aspect-ratio: 1; touch-action: none; cursor: grab; }
.mx-edsub { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; padding: 4px 8px 8px; }
.mx-edsub .mx-in { flex: 1; min-width: 160px; margin: 0; }
.mx-zoom { display: flex; align-items: center; gap: 10px; padding: 0 6px 10px; }
.mx-zoom input { flex: 1; accent-color: var(--ember); }
.mx-vnrec { position: relative; width: min(280px, 70vw); aspect-ratio: 1; margin: 6px auto 10px; border-radius: 50%; overflow: hidden; background: #000; }
.mx-vnrec video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.mx-vnrec .prog { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); fill: none; stroke: var(--ember); stroke-width: 3; stroke-dasharray: 301.6; stroke-dashoffset: calc(301.6 * (1 - var(--p, 0))); }
.mx-vntm { text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--text-2); margin-bottom: 6px; }

/* ---------- wallpapers + colours (per chat, per person) */
.mx-walls { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; }
.mx-wall { position: relative; height: 92px; border-radius: 14px; overflow: hidden; border: 2.5px solid transparent; display: flex; align-items: flex-end; text-align: left; }
.mx-wall span { width: 100%; padding: 4px 8px; font-size: .7em; font-weight: 800; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .65)); }
.mx-wall.on { border-color: var(--ember); }
.mx-swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.mx-sw { width: 44px; height: 44px; border-radius: 50%; background: var(--sw); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .25); border: 3px solid transparent; }
.mx-sw.on { border-color: var(--text); }
.mx-wallprev { display: flex; flex-direction: column; gap: 6px; padding: 18px 14px; border-radius: 18px; margin-bottom: 4px; height: 130px; justify-content: center; }
.mx-wallprev .b { max-width: 70%; padding: 8px 12px; border-radius: 16px; font-size: .9em; }
.mx-wallprev .t { background: var(--theirs); color: var(--theirs-text); align-self: flex-start; }
.mx-wallprev .m { background: var(--sw, var(--mine-a)); color: #fff; align-self: flex-end; }
.mx-conv[data-wall], .mx-wall, .mx-wallprev { --w-bunny: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%23ffffff' fill-opacity='.07'%3E%3Cpath d='M30 52c-4-10-3-24 2-25s6 13 5 23c4-10 9-22 13-20s-1 17-7 25c6 2 10 8 10 14 0 10-8 16-18 16s-18-6-18-16c0-8 6-14 13-17z'/%3E%3Cpath d='M90 112c-3-8-2-19 2-20s5 10 4 18c3-8 7-17 10-16s-1 13-6 20c5 2 8 6 8 11 0 8-6 13-14 13s-14-5-14-13c0-6 5-11 10-13z' transform='translate(-6 -50)'/%3E%3C/g%3E%3C/svg%3E"); }
[data-wall="ember"] { background: radial-gradient(120% 70% at 50% 110%, rgba(255, 90, 40, .35), transparent 60%), radial-gradient(90% 60% at 10% -10%, rgba(200, 16, 46, .28), transparent 60%), #0b0607 !important; }
[data-wall="midnight"] { background: radial-gradient(1.2px 1.2px at 20% 30%, rgba(255, 255, 255, .5), transparent), radial-gradient(1px 1px at 70% 60%, rgba(255, 255, 255, .4), transparent), radial-gradient(1.4px 1.4px at 40% 80%, rgba(255, 255, 255, .45), transparent), linear-gradient(180deg, #0a1028, #050713) !important; background-size: 180px 180px, 240px 240px, 300px 300px, auto !important; }
[data-wall="rose"] { background: radial-gradient(100% 60% at 80% 0%, rgba(255, 111, 168, .32), transparent 60%), radial-gradient(90% 70% at 0% 100%, rgba(200, 16, 46, .25), transparent 60%), #160a10 !important; }
[data-wall="bunny"] { background: var(--w-bunny) 0 0 / 120px 120px, linear-gradient(180deg, #13261a, #0b170f) !important; }
[data-wall="ocean"] { background: radial-gradient(120% 50% at 50% 120%, rgba(46, 196, 182, .35), transparent 60%), linear-gradient(180deg, #06202c, #041219) !important; }
[data-wall="forest"] { background: radial-gradient(110% 60% at 20% 0%, rgba(80, 160, 90, .28), transparent 60%), linear-gradient(180deg, #0d1a10, #070d08) !important; }
[data-wall="sunset"] { background: linear-gradient(180deg, #2a0f2e 0%, #4a1630 45%, #7a2a1c 100%) !important; }
[data-wall="stars"] { background: radial-gradient(1.5px 1.5px at 10% 20%, #fff, transparent), radial-gradient(1px 1px at 60% 40%, #fff, transparent), radial-gradient(1.2px 1.2px at 85% 75%, #fff, transparent), radial-gradient(1px 1px at 30% 90%, #fff, transparent), #000 !important; background-size: 140px 140px, 200px 200px, 260px 260px, 320px 320px, auto !important; }
[data-wall="paper"] { background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .025) 0 1px, transparent 1px 28px), #17151a !important; }
[data-wall="plain"] { background: var(--bg) !important; }
.mx[data-theme="light"] [data-wall="ember"] { background: radial-gradient(120% 70% at 50% 110%, rgba(255, 120, 60, .25), transparent 60%), #FFF4EE !important; }
.mx[data-theme="light"] [data-wall="midnight"] { background: linear-gradient(180deg, #E6EBF8, #D4DCF2) !important; }
.mx[data-theme="light"] [data-wall="rose"] { background: radial-gradient(100% 60% at 80% 0%, rgba(255, 111, 168, .25), transparent 60%), #FFF1F5 !important; }
.mx[data-theme="light"] [data-wall="bunny"] { background: var(--w-bunny) 0 0 / 120px 120px, linear-gradient(180deg, #EEF6EA, #E1EEDB) !important; }
.mx[data-theme="light"] .mx-conv[data-wall="bunny"], .mx[data-theme="light"] .mx-wall[data-wall="bunny"], .mx[data-theme="light"] .mx-wallprev[data-wall="bunny"] { --w-bunny: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='%2317775A' fill-opacity='.10'%3E%3Cpath d='M30 52c-4-10-3-24 2-25s6 13 5 23c4-10 9-22 13-20s-1 17-7 25c6 2 10 8 10 14 0 10-8 16-18 16s-18-6-18-16c0-8 6-14 13-17z'/%3E%3C/g%3E%3C/svg%3E"); }
.mx[data-theme="light"] [data-wall="ocean"] { background: linear-gradient(180deg, #E4F5F7, #CDEBEF) !important; }
.mx[data-theme="light"] [data-wall="forest"] { background: linear-gradient(180deg, #E9F3E6, #D7E9D1) !important; }
.mx[data-theme="light"] [data-wall="sunset"] { background: linear-gradient(180deg, #FFE9D6, #FFD3C4 60%, #F7C1D4) !important; }
.mx[data-theme="light"] [data-wall="stars"] { background: radial-gradient(1.5px 1.5px at 10% 20%, #8B90A0, transparent), radial-gradient(1px 1px at 60% 40%, #8B90A0, transparent), #EEF0F6 !important; background-size: 140px 140px, 200px 200px, auto !important; }
.mx[data-theme="light"] [data-wall="paper"] { background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .035) 0 1px, transparent 1px 28px), #FBF7EF !important; }
.mx-wall[data-wall=""], .mx-wallprev[data-wall=""] { background: var(--glow), var(--bg); }
.mx-conv.accented .mx-row.mine .mx-b::after { background: var(--mine-c); }

/* ---------- small screens */
@media (max-width: 400px) {
  .mx-hooks .mx-ib { width: 40px; height: 40px; }
  .mx-tiles { grid-template-columns: repeat(4, 1fr); gap: 6px; }
  .mx-tilebtn { min-height: 86px; padding: 8px 2px; font-size: .72em; }
  .mx-tilebtn .ring { width: 44px; height: 44px; }
  .mx-egrid { grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); grid-auto-rows: 42px; }
  .mx-emo img { width: 30px; height: 30px; }
  .mx-emo.xl img { width: 74px; height: 74px; }
}
.mx a, body.light .mx a { color: inherit; }
.mx a.mx-btn { text-decoration: none; color: var(--text); }
.mx-row.mine a.mx-btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .55); }
.mx a.mx-cline, .mx-cline { color: inherit; }
/* contrast: secondary text meets WCAG AAA on the chat surfaces (K-02) */
.mx { --text-3: #9C9AA2; }
.mx[data-theme="light"] { --text-3: #5B5F69; --text-2: #43464D; }
.mx-tablist { display: flex; gap: 4px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.mx-tablist::-webkit-scrollbar { display: none; }
/* long chats stay smooth (L-04): the thread scrolls on its own layer, rows outside the screen are skipped by the browser */
.mx-scroll { will-change: scroll-position; }
.mx-col { contain: layout paint; }

/* ---- 0.9.45 video stickers (chat2-media card spec, all of the card width --cw): white card, radius 7.8 %, padding 2.35 %, 0.8 % ink
   outline #1c1022, 0.42 % red hairline just outside the video (video radius 5.7 %), shadow 0 1.3 % 2.6 % rgba(20,10,30,.38).
   Until the mp4 plays, the png poster (card baked in) is the whole picture; then CSS draws the same card round the video. */
.mx-vstk { --cw: 200px; position: relative; width: var(--cw); aspect-ratio: 2 / 3; border-radius: calc(var(--cw) * .078); background: center / 100% 100% no-repeat; cursor: pointer; -webkit-tap-highlight-color: transparent; }
@media (min-width: 900px) { .mx-vstk { --cw: 240px; } }
.mx-vstk-in { position: absolute; inset: 0; border-radius: calc(var(--cw) * .078); opacity: 0; transition: opacity .18s ease; }
.mx-vstk.live .mx-vstk-in { opacity: 1; background: #fff; padding: calc(var(--cw) * .0235); border: calc(var(--cw) * .008) solid #1c1022; box-shadow: 0 calc(var(--cw) * .013) calc(var(--cw) * .026) rgba(20, 10, 30, .38); }
.mx-vstk video { display: block; width: 100%; height: 100%; object-fit: cover; border-radius: calc(var(--cw) * .057); box-shadow: 0 0 0 calc(var(--cw) * .0042) #e2232a; background: #fff; }
.mx-vstk-snd { position: absolute; right: calc(var(--cw) * .06); bottom: calc(var(--cw) * .06); width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: rgba(20, 10, 30, .72); color: #fff; border: 1px solid rgba(255, 255, 255, .35); box-shadow: 0 2px 8px rgba(0, 0, 0, .35); }
.mx-vstk-snd svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mx-vstk-snd[aria-label="Play"] svg { fill: currentColor; stroke: none; }
.mx-vstk-snd[aria-pressed="true"] { background: var(--ember, #e50914); border-color: transparent; }
.mx-vstk-snd:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.mx-libprev.vcard { min-height: 0; }
.mx-libprev.vcard .mx-vstk { --cw: min(240px, 60vw); }
/* the picker: the webp preview already has the card; keep it 2:3 and give it two rows */
.mx-pgrid.sticker .mx-lib.vcard { aspect-ratio: 2 / 3; }
.mx-pgrid.sticker .mx-lib.vcard img { object-fit: contain; padding: 4px; }
.mx-libsnd { position: absolute; left: 6px; bottom: 6px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; display: grid; place-items: center; }
.mx-libsnd .mx-ic { width: 14px; height: 14px; }
/* adults-only item in a chat that is not: a plain grey placeholder, no picture, no link */
.mx-stk-na { display: grid; place-items: center; width: 168px; height: 120px; border-radius: 18px; background: var(--raised, #2a2a30); color: var(--text-2, #c9c9cf); font-weight: 700; font-size: .9em; text-align: center; padding: 12px; border: 1px dashed var(--line-2, #44444c); }

/* ---- 0.9.45 wallpapers from chat2-media: seamless 1024 px tiles shown at 512 px (384 px on phones). A dark tile on the light theme
   (and a light one on the dark theme) gets a veil in the theme's colour, so the chat on top stays readable. */
.mx [data-wall^="wp"] { --wsz: 512px; --wveil: linear-gradient(transparent, transparent); background: var(--wveil), var(--wimg) 0 0 / var(--wsz) var(--wsz) repeat, var(--bg) !important; }
@media (max-width: 600px) { .mx [data-wall^="wp"] { --wsz: 384px; } }
.mx .mx-wall[data-wall^="wp"] { --wsz: 192px; }
.mx [data-wall="wp01-matthew-carbon"] { --wimg: url("/app/wallpapers/wp01-matthew-carbon.webp"); }
.mx [data-wall="wp02-night-shift-stars"] { --wimg: url("/app/wallpapers/wp02-night-shift-stars.webp"); }
.mx [data-wall="wp03-bunny-meadow-light"] { --wimg: url("/app/wallpapers/wp03-bunny-meadow-light.webp"); }
.mx [data-wall="wp04-bunny-meadow-dark"] { --wimg: url("/app/wallpapers/wp04-bunny-meadow-dark.webp"); }
.mx [data-wall="wp05-arcade-grid"] { --wimg: url("/app/wallpapers/wp05-arcade-grid.webp"); }
.mx [data-wall="wp06-jarvis-circuit"] { --wimg: url("/app/wallpapers/wp06-jarvis-circuit.webp"); }
.mx [data-wall="wp07-backyard-light"] { --wimg: url("/app/wallpapers/wp07-backyard-light.webp"); }
.mx [data-wall="wp08-scrubs-and-coffee-light"] { --wimg: url("/app/wallpapers/wp08-scrubs-and-coffee-light.webp"); }
.mx[data-theme="light"] [data-wall="wp01-matthew-carbon"], .mx[data-theme="light"] [data-wall="wp02-night-shift-stars"], .mx[data-theme="light"] [data-wall="wp04-bunny-meadow-dark"],
.mx[data-theme="light"] [data-wall="wp05-arcade-grid"], .mx[data-theme="light"] [data-wall="wp06-jarvis-circuit"] { --wveil: linear-gradient(rgba(246, 246, 249, .84), rgba(246, 246, 249, .84)); }
.mx[data-theme="dark"] [data-wall="wp03-bunny-meadow-light"], .mx[data-theme="dark"] [data-wall="wp07-backyard-light"], .mx[data-theme="dark"] [data-wall="wp08-scrubs-and-coffee-light"] { --wveil: linear-gradient(rgba(11, 11, 14, .80), rgba(11, 11, 14, .80)); }
/* B-10 sticker reactions */
.mx-rxp.stk { padding: 2px 8px 2px 4px; }
.mx-rxstk { width: 34px; height: 34px; object-fit: contain; display: block; }
/* D-03 trim a voice message */
.mx-trimcv { display: block; width: 100%; height: 120px; border-radius: 14px; background: var(--raised, #1d1d22); margin: 6px 0 8px; }
.mx-trimlab { font-weight: 700; text-align: center; margin-bottom: 8px; font-variant-numeric: tabular-nums; }
.mx-triml { display: grid; grid-template-columns: 64px 1fr; align-items: center; gap: 10px; font-weight: 700; margin: 6px 0; }
.mx-triml input[type=range] { width: 100%; accent-color: var(--ember, #E50914); height: 32px; }
.mx-row2 { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; margin-top: 10px; }
/* F-02 group photo in the avatar */
.mx-av.ph { overflow: hidden; color: transparent; }
.mx-av.ph > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }
.mx-av { position: relative; }
/* K-04 first-run tour */
.mx-tour { text-align: center; padding: 6px 4px 2px; }
.mx-tour .ring.big { width: 76px; height: 76px; margin: 4px auto 6px; display: grid; place-items: center; border-radius: 50%; background: rgba(229, 9, 20, .14); color: var(--ember, #E50914); }
.mx-tour .ring.big .mx-ic { width: 38px; height: 38px; }
.mx-tourn { margin: 0; font-weight: 700; color: var(--text-3); font-size: .9em; }
.mx-tour h2 { margin: 4px 0 6px; }
.mx-tour .lead { font-size: 1.08em; line-height: 1.45; min-height: 4.4em; }
.mx-tourdots { display: flex; gap: 8px; justify-content: center; margin: 10px 0 4px; }
.mx-tourdots span { width: 9px; height: 9px; border-radius: 50%; background: var(--line-2, #44444c); }
.mx-tourdots span.on { background: var(--ember, #E50914); width: 22px; border-radius: 6px; }
/* C-03 / B-06 emoji stamps + blur in the photo editor */
.mx-edemo { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 4px; max-height: 112px; overflow-y: auto; width: 100%; }
.mx-edemo .mx-emo { height: 52px; border-radius: 12px; display: grid; place-items: center; }
.mx-edemo .mx-emo img { width: 40px; height: 40px; }
.mx-edhint { font-weight: 700; color: var(--text-2); }
/* C-03 video trim */
.mx-trimvid { display: block; width: 100%; max-height: 42vh; border-radius: 14px; background: #000; margin: 6px 0 8px; }
.mx-trimtag { position: absolute; left: 4px; bottom: 6px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 12px; font-weight: 800; border-radius: 6px; padding: 1px 5px; }
/* B-06 words on a GIF: live preview (the NAS draws the real ones) */
.mx-capprev { position: relative; display: grid; place-items: center; margin: 4px auto 10px; max-width: 360px; }
.mx-capprev img { width: 100%; border-radius: 12px; display: block; }
.mx-capprev .cap { position: absolute; left: 4%; right: 4%; text-align: center; color: #fff; font-weight: 900; font-size: clamp(18px, 6vw, 30px); line-height: 1.1;
  -webkit-text-stroke: 1.5px #000; paint-order: stroke fill; text-shadow: 0 2px 3px rgba(0, 0, 0, .6); pointer-events: none; overflow-wrap: anywhere; }
.mx-capprev .cap.t { top: 4%; } .mx-capprev .cap.b { bottom: 5%; }
.mx-capprev + .mx-in, .mx-capprev ~ .mx-in { margin-bottom: 8px; }
/* A-17 select text, A-18 nudge, B-09 bubble effects, K-05 shortcuts */
.mx-seltext { user-select: text; -webkit-user-select: text; padding: 14px 16px; border-radius: 16px; background: var(--raised, #1d1d22); font-size: 1.1em; line-height: 1.5; max-height: 50vh; overflow-y: auto; margin-bottom: 8px; }
.mx-sys.nudge { font-weight: 800; color: var(--ember, #E50914); }
.mx-sys.nudge .mx-ic { width: 18px; height: 18px; }
.mx.mx-nudged .mx-conv { animation: mxNudge .8s cubic-bezier(.36, .07, .19, .97) both; }
@keyframes mxNudge { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-8px); } 40%, 60% { transform: translateX(8px); } }
.mx-b.bfx-play.bfx-slam { animation: bfxSlam .55s cubic-bezier(.2, 1.6, .4, 1) both; }
.mx-b.bfx-play.bfx-loud { animation: bfxLoud .9s ease both; }
.mx-b.bfx-play.bfx-gentle { animation: bfxGentle 1.6s ease both; }
.mx-b.bfx-play.bfx-shake { animation: mxNudge .8s ease both; }
.mx-b.bfx-play.bfx-bloom { animation: bfxBloom 1.1s ease both; }
.mx-b.bfx-loud .mx-txt { font-weight: 800; }
.mx-b.bfx-gentle .mx-txt { font-size: .92em; opacity: .92; }
.mx-b.bfx-ink:not(.shown) .mx-txt, .mx-b.bfx-ink:not(.shown) img, .mx-b.bfx-ink:not(.shown) video { filter: blur(9px) saturate(.6); cursor: pointer; transition: filter .4s; }
.mx-b.bfx-ink:not(.shown)::after { content: 'Tap to see'; position: absolute; inset: auto 0 6px 0; text-align: center; font-size: 12px; font-weight: 800; opacity: .85; pointer-events: none; }
.mx-b.bfx-ink { position: relative; }
@keyframes bfxSlam { 0% { transform: scale(2.4) rotate(-6deg); opacity: 0; } 60% { transform: scale(.94); opacity: 1; } 100% { transform: none; } }
@keyframes bfxLoud { 0% { transform: scale(1); } 25% { transform: scale(1.35); } 45% { transform: scale(1.25) rotate(-3deg); } 60% { transform: scale(1.3) rotate(3deg); } 100% { transform: none; } }
@keyframes bfxGentle { 0% { transform: scale(.7); opacity: 0; } 100% { transform: none; opacity: 1; } }
@keyframes bfxBloom { 0% { box-shadow: 0 0 0 0 rgba(229, 9, 20, .0); } 30% { box-shadow: 0 0 40px 18px rgba(255, 120, 160, .55); } 100% { box-shadow: 0 0 0 0 rgba(229, 9, 20, 0); } }
.mx-fxb.bfxb.demo { animation: bfxLoud .6s ease; }
.mx-kb { display: grid; gap: 6px; }
.mx-kbrow { display: flex; justify-content: space-between; gap: 12px; padding: 8px 4px; border-bottom: 1px solid var(--line, #2a2a30); font-size: 1.02em; }
.mx-kbrow kbd { display: inline-block; min-width: 26px; padding: 2px 8px; border-radius: 7px; border: 1px solid var(--line-2, #44444c); background: var(--raised, #1d1d22); font: 700 .9em/1.4 inherit; text-align: center; }
@media (prefers-reduced-motion: reduce) { .mx-b.bfx-play, .mx.mx-nudged .mx-conv { animation: none !important; } }
.mx-lbcap { position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 18px calc(14px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, rgba(0, 0, 0, .75) 40%); color: #fff; font-size: 1.05em; max-height: 30vh; overflow-y: auto; }
/* C-06 motion photos */
.mx-livewrap { position: relative; display: block; }
.mx-livewrap > img { display: block; }
.mx-live { position: absolute; left: 8px; top: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px 3px 6px; border-radius: 999px; background: rgba(0, 0, 0, .58); color: #fff; font: 800 12px/1.2 inherit; letter-spacing: .06em; border: 1px solid rgba(255, 255, 255, .4); }
.mx-live .mx-ic { width: 14px; height: 14px; }
.mx-livevid { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; border-radius: inherit; background: #000; }
.mx-livewrap.playing .mx-live { background: var(--ember, #E50914); }
/* F-08 threads, F-09 labels, F-10 status, I-05 safety numbers, G-05 folders */
.mx-threadbtn { display: inline-flex; align-items: center; gap: 6px; margin: 2px 0 2px 46px; padding: 6px 12px; border-radius: 999px; background: var(--raised, #1d1d22); border: 1px solid var(--line, #2a2a30); font-size: .9em; color: var(--text-2); }
.mx-row.mine .mx-threadbtn { margin-left: auto; margin-right: 8px; }
.mx-threadbtn b { color: var(--ember, #E50914); }
.mx-threadbtn .mx-ic { width: 16px; height: 16px; }
.mx-thread { max-height: 52vh; overflow-y: auto; display: grid; gap: 8px; margin-bottom: 10px; }
.mx-thr { padding: 10px 14px; border-radius: 16px; background: var(--raised, #1d1d22); }
.mx-thr.mine { background: rgba(229, 9, 20, .16); }
.mx-thr .who { font-weight: 800; font-size: .9em; margin-bottom: 2px; } .mx-thr .who span { font-weight: 600; color: var(--text-3); }
.mx-thrsep { text-align: center; font-weight: 800; color: var(--text-3); font-size: .85em; }
.mx-label { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(124, 92, 255, .2); color: inherit; font-size: .78em; font-weight: 800; vertical-align: 1px; }
.mx-ustatus { font-weight: 700; color: var(--text-2); }
.mx-rstatus { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .78em; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--raised, #1d1d22); color: var(--text-2); margin: 0 6px; }
.mx-safety { margin-bottom: 10px; display: grid; gap: 10px; }
.mx-safety .who { font-weight: 800; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.mx-safety .ok { color: #2EC46A; display: inline-flex; gap: 4px; align-items: center; font-size: .9em; } .mx-safety .warn { color: var(--warn, #E8890C); font-size: .85em; }
.mx-safety .num { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px 10px; font: 700 1.2em/1.4 ui-monospace, Consolas, monospace; letter-spacing: .06em; text-align: center; }
/* I-04 view once: veiled when the window loses focus; no selecting or dragging */
.mx-lb.once { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.mx-lb.once img, .mx-lb.once video { -webkit-user-drag: none; pointer-events: auto; }
.mx-lb.once.veiled > :not(.mx-lbbar) { filter: blur(36px) brightness(.6); }
.mx-lb.once.veiled::after { content: 'Tap to see it again'; position: absolute; inset: 45% 0 auto 0; text-align: center; color: #fff; font-weight: 800; font-size: 1.1em; pointer-events: none; }
/* B-13 game challenge card */
.mx-arcade .ring { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: linear-gradient(160deg, #7C4DFF, #E50914); color: #fff; flex: none; }
.mx-arcade .mx-c2kicker { font-size: .82em; font-weight: 700; color: inherit; opacity: .78; }
.mx-arcade .sub { color: inherit; opacity: .78; font-size: .86em; margin-top: 2px; }
.mx-arcade .mx-c2foot { margin-top: 10px; }
/* Game Challenge (2026-10-29): big, readable, two buttons */
.mx-gc .mx-c2title { font-size: 1.22em; }
.mx-gc .sub { font-size: .95em; }
.mx-gclink { font-family: ui-monospace, Consolas, monospace; font-size: .95em; opacity: .9; margin-top: 8px; word-break: break-all; }
.mx-gcfoot { display: flex; gap: 8px; flex-wrap: wrap; }
.mx-gcfoot .mx-btn { flex: 1 1 45%; min-height: 52px; font-size: 1em; font-weight: 800; }
.mx-gcgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; padding: 8px 0 14px; }
.mx-gcnum { min-height: 86px; border-radius: 16px; border: 2px solid var(--line-2); background: var(--steel); color: var(--text); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; cursor: pointer; font: inherit; }
.mx-gcnum b { font-size: 2em; line-height: 1; }
.mx-gcnum span { font-size: .85em; opacity: .8; }
.mx-gcnum:hover, .mx-gcnum:focus-visible { border-color: var(--mine-a); outline: none; }
.mx-row.mine .mx-gc .mx-btn.red { background: #fff; color: #c8102e; }   /* the sender's bubble is red: START must not drown in it */
.mx-gcfoot .mx-btn { white-space: nowrap; letter-spacing: 0; padding: 0 12px; }
/* round 3 (2026-10-30): one link per player on the sender's card - TEXT / COPY per row */
.mx-gcinv { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.mx-gcinvhead { font-size: .9em; font-weight: 650; opacity: .92; }
.mx-gcrow { display: flex; align-items: center; gap: 8px; background: rgba(0, 0, 0, .2); border-radius: 12px; padding: 8px 10px; }
.mx-gcwho { font-weight: 800; flex: none; min-width: 4.4em; font-size: .98em; }
.mx-gclnk { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: .8em; opacity: .9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mx-gcrow .mx-btn { flex: none; min-height: 44px; padding: 0 12px; font-size: .9em; font-weight: 800; white-space: nowrap; letter-spacing: 0; }
.mx-row.mine .mx-gcrow .mx-btn { background: rgba(255, 255, 255, .18); color: #fff; }
.mx-row.mine .mx-gcrow .mx-btn.red { background: #fff; color: #c8102e; }
@media (max-width: 520px) { .mx-gclnk { display: none; } .mx-gcrow .mx-btn { flex: 1; min-height: 48px; } }   /* round 3b: on a phone the row is Player N + COPY + TEXT (no squeezed link text) */
.mx-rtop .mx-rname { flex: 0 0 auto; max-width: 70%; overflow: hidden; text-overflow: ellipsis; }   /* the name first, the status pill gives way */
.mx-rtop .mx-rstatus { flex: 0 10 auto; min-width: 0; }
.mx-rtop .mx-rtime { margin-left: auto; }   /* times line up on the right with or without a status */
.mx-row.mine .mx-b.card { border-color: transparent; }   /* no grey outline on my red cards */

/* rc2 premium: GIFs in justified rows at their own aspect ratio (no cropped words), the last row does not stretch */
.mx-pgrid.lib.gif { display: flex; flex-wrap: wrap; gap: 6px; }
.mx-pgrid.lib.gif::after { content: ''; flex: 10000 1 0; }
.mx-pgrid.lib.gif > .mx-pnote { flex-basis: 100%; }
.mx-pgrid.lib.gif .mx-lib { min-width: 0; }
.mx-pgrid.lib.gif .mx-lib.make { flex: 1 1 92px; aspect-ratio: 1; }

/* run-0 R0-07: a non-adult viewer sees the eggplant at normal size everywhere (Matthew and Courtney unchanged) */
.mx[data-adult="0"] img.mmoji.mmoji-xxl { width: var(--mmoji-size, 1.3em) !important; vertical-align: -.28em !important; margin: 0 !important; }
.mx[data-adult="0"] img.mmoji.mmoji-big.mmoji-xxl { width: 3.2em !important; vertical-align: middle !important; }

/* run-0 R0-02/R0-03 + main (c): on phones the picker takes ~62% of the screen (3-4 full rows of emoticons), keyboard-aware through
   --mx-vvh; the tabs always fit: icon + label, and on narrow screens or Largest text only the open tab keeps its label */
.mx-tab { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; }
.mx-tab .mx-ic { width: 20px; height: 20px; flex: none; }
.mx-tab.close .mx-ic { width: 22px; height: 22px; }
@media (max-width: 899px) {
  .mx-panel { height: clamp(300px, calc(var(--mx-vvh, 100vh) * .62), 680px); max-height: calc(var(--mx-vvh, 100vh) - 170px); }
  .mx-panel .mx-pbar { padding: 6px 8px 2px; }
}
@media (max-width: 480px) {
  .mx-tablist { overflow: visible; gap: 2px; }
  .mx-tab { padding: 0 12px; min-width: 44px; }
  .mx-tab:not(.on) .t { display: none; }
}
.mx[data-size="largest"] .mx-tab:not(.on) .t, .mx[data-size="big"] .mx-tablist .mx-tab:not(.on) .t { display: none; }
@media (min-width: 481px) { .mx:not([data-size="largest"]):not([data-size="big"]) .mx-tab .mx-ic { display: none; } }
/* R0-24: one clean focus ring around the whole search pill (not a second box on the inner input) */
.mx .mx-field input:focus-visible { outline: none; }
.mx .mx-field:focus-within { box-shadow: 0 0 0 2.5px var(--focus); }
/* R0-25: the video sticker tile shares the grid's size and baseline; its sound badge sits inside the corner */
.mx-pgrid.sticker .mx-lib.vcard { aspect-ratio: 1; }
.mx-pgrid.sticker .mx-lib.vcard img { object-fit: contain; padding: 6px; }
.mx-libsnd { left: 8px; bottom: 8px; }
/* main (c): at least 3-4 full rows of emoticons / stickers on a phone */
@media (max-width: 480px) { .mx-pgrid.lib.sticker, .mx-pgrid.lib.emote { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 4px; } }
@media (max-width: 400px) { .mx-pgrid.lib.sticker, .mx-pgrid.lib.emote { grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); } }

/* main (a) + R0-04: on phones the chat header is back + avatar + the whole name/status + ONE call button + chat info.
   Video, the voice room, scheduled and search move into chat info; a live call shows a compact Join instead of the call button. */
@media (max-width: 480px) {
  .mx-chead { gap: 2px; padding-right: 4px; }
  .mx-chead .mxc-hb > .mx-ib:not(.mxc-join):not([title="Voice call"]) { display: none !important; }
  .mx-chead .mxc-hb > .mxc-join:not([hidden]) ~ .mx-ib { display: none !important; }
  .mx-chead .mxc-join .l { display: none; }
  .mx-chead .mxc-join { padding: 0 !important; width: 44px !important; justify-content: center; }
  .mx-chead > .mx-ib[title="Scheduled messages"] { display: none !important; }
  .mx-chead .mx-who { gap: 10px; padding: 4px; }
  .mx-chead .mx-ib { width: 44px; min-width: 44px; }
}
.mx-qa { grid-template-columns: repeat(auto-fit, minmax(72px, 1fr)); }
/* R0-04 (PC with chat info open): the same compact header whenever the conversation column itself is narrow */
.mx-conv { container-type: inline-size; container-name: mxconv; }
@container mxconv (max-width: 560px) {
  .mx-chead .mxc-hb > .mx-ib:not(.mxc-join):not([title="Voice call"]) { display: none !important; }
  .mx-chead .mxc-hb > .mxc-join:not([hidden]) ~ .mx-ib { display: none !important; }
  .mx-chead .mxc-join .l { display: none; }
  .mx-chead .mxc-join { padding: 0 !important; width: 44px !important; justify-content: center; }
  .mx-chead > .mx-ib[title="Scheduled messages"], .mx-chead > .mx-ib.hide-narrow { display: none !important; }
}
/* R0-21: the pinned bar's preview icon sits on the same line as its text */
.mx-pinbar .t > span > span { display: inline; }
.mx-pinbar .t > span > .pvic, .mx-pinbar .t > span > .mx-ic { display: inline-block; vertical-align: -3px; margin-right: 5px; }
/* R0-27: RSVP labels keep their padding at Largest text */
.mx-rsvps button { padding-left: 10px; padding-right: 10px; white-space: nowrap; min-width: 0; }
.mx[data-size="largest"] .mx-rsvps button { font-size: .86em; }
/* R0-31: short system notices wrap evenly (no lone last word) */
.mx-sys, .mx-sys > span { text-wrap: balance; }
/* R0-22: "Missed video call" stays on one line; on a narrow bubble Call back moves under it */
.mx-card2.mx-call { flex-wrap: wrap; }
.mx-call .grow { min-width: 8.5em; }
.mx-call .mx-c2title { white-space: nowrap; }
.mx-call .mx-btn { margin-left: auto; }
/* R0-29: with Bigger / Largest text on a narrow phone the wordmark never runs under the app-bar icons */
.mx-brand { overflow: hidden; }
.mx-word, .mx-sub { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 430px) {
  .mx[data-size="largest"] .mx-word, .mx[data-size="big"] .mx-word { font-size: 1em; }
  .mx[data-size="largest"] .mx-sub { font-size: .7em; }
  .mx[data-size="largest"] .mx-appbar { gap: 4px; padding-left: 8px; }
  .mx[data-size="largest"] .mx-appbar .mx-ib { width: 42px; min-width: 42px; }
}
@media (max-width: 380px) { .mx[data-size="largest"] .mx-appbar .mx-logo { width: 34px; height: 34px; } }
/* R0-29 (360, normal text): the wordmark fits beside the three app-bar icons */
@media (max-width: 380px) { .mx-word { font-size: 1em; } .mx-appbar { gap: 6px; padding-left: 10px; } .mx-appbar .mx-logo { width: 38px; height: 38px; } }
/* R0-27 (360 + Largest): the three RSVP buttons wrap instead of running past the card */
.mx-rsvps { flex-wrap: wrap; }
.mx-rsvps > button { flex: 1 1 5.5em; min-width: 0; }
/* 360 + Bigger/Largest text: whole words on the + sheet tiles and the chat-info quick actions (3 across, never "Emotico/ns") */
@media (max-width: 430px) {
  .mx[data-size="largest"] .mx-tiles, .mx[data-size="big"] .mx-tiles { grid-template-columns: repeat(3, 1fr); }
  .mx[data-size="largest"] .mx-qa, .mx[data-size="big"] .mx-qa { grid-template-columns: repeat(3, 1fr); }
}
.mx-tiles > *, .mx-qa button { min-width: 0; overflow-wrap: normal; word-break: normal; hyphens: auto; }
.mx-qa button { text-align: center; line-height: 1.2; }

/* rc2: the one branded chat toast (window.toast while the chat page is open) */
.mx-toast { position: fixed; z-index: 60; transform: translateX(-50%); display: flex; align-items: center; gap: 10px; width: max-content; padding: 8px 6px 8px 14px;
  border-radius: 16px; background: var(--raised); color: var(--text); border: 1px solid var(--line-2); box-shadow: 0 12px 32px rgba(0, 0, 0, .38); font-size: .9em; font-weight: 650;
  animation: mxToastIn .22s cubic-bezier(.2, .8, .2, 1); }
.mx-toast.out { opacity: 0; transform: translate(-50%, 6px); transition: opacity .18s, transform .18s; }
.mx-toast .ic { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: rgba(46, 196, 106, .16); color: #2EC46A; flex: none; }
.mx-toast.bad .ic { background: color-mix(in srgb, var(--ember) 18%, transparent); color: var(--ember); }
.mx-toast .ic .mx-ic { width: 16px; height: 16px; }
.mx-toast .msg { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.3; }
.mx-toast .act { flex: none; padding: 8px 12px; border-radius: 12px; font-weight: 800; color: var(--ember); }
.mx-toast .act:hover { background: var(--steel); }
.mx-toast .x { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); }
.mx-toast .x:hover { background: var(--steel); }
.mx-toast .x .mx-ic { width: 18px; height: 18px; }
@keyframes mxToastIn { from { opacity: 0; transform: translate(-50%, 10px); } }
.mx[data-motion="reduce"] .mx-toast { animation: none; }
@media (prefers-reduced-motion: reduce) { .mx-toast { animation: none; } }
/* R1-08: the reply quote's sender name passes contrast on dark */
.mx[data-theme="dark"] .mx-row:not(.mine) .mx-quote b { color: #FF7A80; }

/* run-2 polish */
.mx-archhead > .mx-ic { flex-basis: auto; padding-left: 0; }   /* R2-40: the back chevron sits beside "Archived chats" */
.mx-line { touch-action: pan-y; }   /* R2-22: a sideways swipe on a message reaches the swipe-to-reply code */
.mx-egrid > .mx-pnote { grid-column: 1 / -1; grid-row: auto; align-self: start; margin: 4px 0 8px; }   /* R2-32 */
.mx-egrid:has(> .mx-pnote) { grid-auto-rows: auto; }
.mx[data-size="largest"] .mx-meta, .mx[data-size="big"] .mx-meta { white-space: normal; flex-wrap: wrap; max-width: 100%; }   /* R2-37 */
@media (pointer: coarse) {   /* R2-36: 44 px touch targets on phones */
  .mx-chipb { min-height: 44px; }
  .mx-input .mx-ib { min-width: 44px; min-height: 44px; }
  .mx-rxp { min-height: 36px; padding-top: 4px; padding-bottom: 4px; }
  .mx .mx-tab { min-height: 44px; }
  .mx .mx-cat { min-height: 44px; }
}
/* R1-30: with Bigger / Largest text on the PC the chat list gets the room its bigger letters need */
@media (min-width: 1100px) {
  .mx[data-size="largest"] { grid-template-columns: 440px minmax(0, 1fr); }
  .mx[data-size="largest"].drawer-open { grid-template-columns: 420px minmax(0, 1fr) 400px; }
  .mx[data-size="big"] { grid-template-columns: 400px minmax(0, 1fr); }
  .mx[data-size="big"].drawer-open { grid-template-columns: 380px minmax(0, 1fr) 380px; }
}

/* rc3 */
.mx[data-theme="dark"] .mx-status .typing, .mx[data-theme="dark"] .mx-rprev .typing { color: #FF6F77; }   /* R2-12: typing text contrast on dark */
@media (pointer: coarse) {   /* R1-13: switches and segments are easy to hit */
  .mx-switch { position: relative; }
  .mx-switch::before { content: ''; position: absolute; inset: -8px -4px; }
  .mx-seg button { min-height: 44px; }
}
/* R1-26: the PC's What's new card at the top of the chat list (never a covering dialog by itself) */
.mx-wnbanner { display: flex; align-items: center; gap: 10px; margin: 6px 10px 8px; padding: 10px 6px 10px 12px; border-radius: 16px; background: var(--raised); border: 1px solid var(--line-2); }
.mx-wnbanner .ring { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: color-mix(in srgb, var(--ember) 16%, transparent); color: var(--ember); flex: none; }
.mx-wnbanner .grow { min-width: 0; display: flex; flex-direction: column; font-size: .86em; }
.mx-wnbanner .grow span { color: var(--text-2); font-size: .9em; }
.mx-wnbanner .mx-btn { min-height: 38px; padding: 0 12px; font-size: .82em; flex: none; }
/* R2-12 contrast: my own reaction chip and search highlights read clearly */
.mx-rxp.me, .mx-rxp.me b, .mx-rxp.me span { color: var(--text); }
.mx-result mark, .mx-txt mark { color: var(--text); }
.mx[data-theme="light"] .mx-result mark, .mx[data-theme="light"] .mx-txt mark { background: rgba(229, 9, 20, .18); }
.mx-result .snip { color: var(--text-2); }
/* rc3: the MatthewMail wordmark is never cut off in the 360 px PC list column - the three header buttons sit closer together (targets stay 46 px) */
.mx-appbar > .mx-ib + .mx-ib { margin-left: -6px; }
/* rc3 (R2-30): the video sticker's picker tile is a rounded square like the other media tiles - its baked-in card edge is cropped off, the sound badge sits inside */
.mx-pgrid.sticker .mx-lib.vcard { aspect-ratio: 1; overflow: hidden; border-radius: 16px; padding: 0; isolation: isolate; margin: 7%; }
.mx-pgrid.sticker .mx-lib.vcard img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 62%; padding: 0; transform: scale(1.14); border-radius: 0; }
.mx-pgrid.sticker .mx-lib.vcard .mx-libsnd { z-index: 1; left: 6px; bottom: 6px; }
/* rc3: a system line that wraps keeps its icon in the text (not floating beside two centred lines) */
.mx-sys { display: block; }
.mx-sys > .mx-ic, .mx-sys > svg { display: inline-block; vertical-align: -3px; margin-right: 6px; }
.mx-sys > span { display: inline; }
/* rc3: the search field gives way so its Close button always stays on screen (360 px, Largest) */
.mx-gsbar .mx-field { min-width: 0; }
.mx-gsbar .mx-field input { min-width: 0; width: 100%; }
.mx-gsbar > .mx-ib { flex: none; }
/* rc3: the "3 matches" line lines up with the results under it */
.mx-gres > .mx-pnote.small { padding: 8px 16px; }
/* rc3: the reaction row in a message's sheet always fits (360 px, Largest): the 10 buttons share the width, emoji scale down */
.mx-reactrow { gap: 2px; }
.mx-reactrow button { flex: 1 1 0; min-width: 0; width: auto; max-width: 48px; height: auto; aspect-ratio: 1; }
.mx-reactrow button img.mmoji { --mmoji-size: min(34px, 82%); width: var(--mmoji-size); height: auto; aspect-ratio: 1; margin: 0; }
.mx-reactrow .more .mx-ic, .mx-reactrow button > svg { width: min(22px, 70%); height: auto; aspect-ratio: 1; }
@media (max-width: 480px) {   /* phones: 44 px reaction targets in a row that scrolls sideways; Sticker and + stay pinned at the end */
  .mx-reactrow { overflow-x: auto; scrollbar-width: none; justify-content: flex-start; overscroll-behavior-x: contain; }
  .mx-reactrow::-webkit-scrollbar { display: none; }
  .mx-reactrow button { flex: 0 0 44px; width: 44px; height: 44px; max-width: none; aspect-ratio: auto; }
  .mx-reactrow button img.mmoji { --mmoji-size: 30px; }
  .mx-reactrow .more { position: sticky; right: 0; z-index: 1; background: var(--surface); border-radius: 0; box-shadow: -4px 0 0 var(--surface); }
  .mx-reactrow .more:nth-last-child(2) { right: 46px; box-shadow: -12px 0 10px -6px var(--surface); }
}
/* rc3: date / time rows never run off a phone (360 px, Largest): two columns while they fit, else one */
.mx-dt { grid-template-columns: repeat(auto-fit, minmax(min(100%, 9.5em), 1fr)); }
.mx-dt label, .mx .mx-dt input { min-width: 0; }
/* the Repeat choices wrap onto a second line instead of squeezing */
.mx-seg[aria-label="Repeat"] { flex-wrap: wrap; }
.mx-seg[aria-label="Repeat"] button { flex: 1 1 auto; white-space: nowrap; padding: 0 12px; }
/* narrow + large text: the in-field Send options clock steps aside (hold Send opens the same options) so the text box keeps its width */
@container mxconv (max-width: 400px) { .mx[data-size="largest"] .mx-ib[aria-label^="Send options"], .mx[data-size="big"] .mx-ib[aria-label^="Send options"] { display: none; } }
/* rc3: app.css's global .big no longer blows up the place sheet's map note; a permission message reads like a normal note */
.mx .mx-map.big { font-size: 1em; font-weight: 400; }
.mx .mx-map .mx-pnote { font-size: .88em; font-weight: 600; line-height: 1.4; padding: 16px 20px; }
/* rc3: the "Make a sticker" tile keeps its whole label in a 4-across grid at Largest (smaller words, icon on top) */
.mx-lib.make { overflow: hidden; line-height: 1.12; hyphens: none; overflow-wrap: normal; }
.mx[data-size="largest"] .mx-pgrid.sticker .mx-lib.make, .mx[data-size="big"] .mx-pgrid.sticker .mx-lib.make { font-size: .6em; gap: 2px; padding: 4px; }
.mx[data-size="largest"] .mx-pgrid.sticker .mx-lib.make .mx-ic, .mx[data-size="big"] .mx-pgrid.sticker .mx-lib.make .mx-ic { width: 24px; height: 24px; }
