/* Message actions sit outside the bubble and remain available without hover. */
.ma-strip {
  display:flex; align-items:center; flex-wrap:wrap; gap:2px 7px; min-width:0;
  margin:3px 0 1px; color:#5d6e85;
}
.ma-strip .ma-btn, .ma-pinbar .ma-btn {
  display:inline-flex; align-items:center; justify-content:center; gap:4px;
  min-width:0; min-height:24px; padding:2px 6px; border:0; border-radius:4px;
  font:inherit; font-size:11px; line-height:1.3; cursor:pointer; color:#4c607b;
  background:transparent; white-space:nowrap; touch-action:manipulation;
  transition:background-color .15s,color .15s;
}
.ma-strip .ma-btn:first-child { margin-inline-start:-4px; }
.ma-strip .ma-btn[hidden],.ma-pinbar [data-ma-readonly][hidden] { display:none!important; }
.ma-pinbar [data-ma-readonly] { color:#765621; padding:2px 5px; font-size:11px; white-space:nowrap; }
.ma-strip .ma-btn:disabled, .ma-pinbar .ma-btn:disabled { opacity:.5; cursor:default; }
.ma-strip .ma-btn:not(:disabled):hover, .ma-pinbar .ma-btn:not(:disabled):hover { background:#eaf1fb; color:#234f9f; }
.ma-strip .ma-btn[aria-pressed="true"], .ma-strip .ma-btn[data-done="true"] { color:#1855bf; background:#edf4ff; }
.ma-strip .ma-btn[data-done="true"] { color:#196a45; background:#eaf7f0; }
.ma-strip .ma-btn:focus-visible, .ma-pinbar button:focus-visible { outline:2px solid #356fd7; outline-offset:1px; }
.ma-icon {
  width:14px; height:14px; flex:0 0 auto; color:inherit;
  fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round;
}
.ma-feedback {
  margin:0; min-width:0; padding:4px 10px; flex:0 0 auto; color:#176448; background:#eff9f3;
  font-size:11px; line-height:1.4; overflow-wrap:anywhere;
}
.ma-feedback[data-kind="error"] { color:#9c333b; background:#fff1f0; }
.ma-feedback:empty { padding:0; background:none; }
.ma-clipboard { position:fixed!important; left:-9999px!important; top:0!important; pointer-events:none!important; }
.ma-pinbar {
  display:flex; align-items:center; justify-content:space-between; gap:8px; flex:0 0 auto; min-width:0;
  color:#684106; margin:8px 14px 5px; padding:5px 7px 5px 6px;
  background:#fff8e9; border:1px solid #edcf91; border-inline-start:3px solid #c27d10; border-radius:8px;
}
.ma-pinbar[hidden] { display:none!important; }
.ma-pinbar [data-ma-jump] {
  display:flex; align-items:center; justify-content:flex-start; gap:8px; flex:1 1 auto; min-width:0;
  border:0; border-radius:6px; color:inherit; background:none; padding:3px 5px; min-height:35px; text-align:left;
  font:inherit; font-size:13px; cursor:pointer; touch-action:manipulation;
}
.ma-pinbar [data-ma-jump]:hover { background:#fff0d2; }
.ma-pinmark {
  flex:0 0 auto; display:grid; place-items:center; width:30px; height:30px;
  color:#794b08; background:#ffe5ae; border-radius:7px;
}
.ma-pinmark .ma-icon,.ma-pinmark svg { width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; stroke-linejoin:round; }
.ma-pintext { display:flex; flex-direction:column; min-width:0; flex:1 1 auto; gap:2px; }
.ma-pinmeta { display:flex; align-items:center; gap:6px; min-width:0; }
.ma-pinmeta strong { white-space:nowrap; font-size:12px; font-weight:750; }
.ma-pinmeta [data-ma-audience] {
  color:#51535c; background:#fff; border:1px solid #e7d9bb; border-radius:3px; padding:1px 4px;
  font-size:10px; font-weight:650; line-height:1.25; white-space:nowrap;
}
.ma-pinmeta [data-ma-audience][data-public="true"] { color:#145945; border-color:#b6e1d0; background:#e9f9f1; }
.ma-pinbar [data-ma-preview] { min-width:0; text-overflow:ellipsis; overflow:hidden; white-space:nowrap; color:#292f37; font-size:13px; font-weight:630; line-height:1.4; }
.ma-pin-controls { display:flex; flex:0 0 auto; gap:5px; align-items:center; }
.ma-pinbar .ma-pin-controls .ma-btn { color:#664718; min-height:29px; padding:2px 7px; }
.ma-pinbar .ma-pin-controls .ma-btn:hover { background:#ffedc7; color:#5a3802; }
.ma-pinbar [data-ma-visibility] { border:1px solid #e9d4a8; background:#fff; }
.ma-pinbar [data-ma-drop],.ma-pinbar [data-ma-visibility] { flex-shrink:0; }
.ma-pinbar [data-ma-drop][hidden],.ma-pinbar [data-ma-visibility][hidden] { display:none!important; }
.ma-pinned-stamp {
  display:inline-flex; flex:0 0 auto; align-items:center; gap:3px; padding:1px 4px; margin-inline-start:3px;
  border-radius:3px; background:#fdf0cf; color:#764908; white-space:nowrap; font-size:10px; font-weight:700; line-height:1.4;
}
.ma-pinned-stamp .ma-icon { width:10px; height:10px; }
[data-ma-pinned="true"] .bubble,[data-ma-pinned="true"] .msg { outline:1px solid #d9a03d; outline-offset:1px; }
.ma-highlight { outline:2px solid #4979cb!important; outline-offset:2px; border-radius:6px; }
.ma-audience-dialog {
  max-width:min(440px,calc(100vw - 24px)); width:440px; max-height:calc(100dvh - 24px);
  overflow:auto; border:1px solid #dce3ed; color:#192636; background:#fff;
  border-radius:12px; padding:0; box-shadow:0 20px 68px #20365333;
}
.ma-audience-dialog::backdrop { background:#17283a77; backdrop-filter:none; }
.ma-audience-dialog form { display:block; padding:18px; margin:0; }
.ma-audience-dialog h2 { margin:0 0 8px; font-size:16px; color:#192636; }
.ma-audience-lede { font-size:13px; color:#526271; margin:0 0 14px; line-height:1.6; }
.ma-audience-choices { display:grid; gap:8px; }
.ma-audience-choices label { display:flex; gap:8px; align-items:center; margin:0; padding:10px; border:1px solid #dce3ed; border-radius:7px; cursor:pointer; }
.ma-audience-choices label:has(input:checked) { background:#f0f6ff; border-color:#70a4ed; }
.ma-audience-choices label:focus-within { outline:2px solid #4b80d0; }
.ma-audience-choices input[type=radio] { margin:0; width:15px; height:15px; flex:0 0 auto; accent-color:#245dcc; }
.ma-audience-choices label svg { color:#2f5c96; }
.ma-audience-choices strong,.ma-audience-choices small { display:block; line-height:1.4; }
.ma-audience-choices strong { color:#203147; font-size:13px; }
.ma-audience-choices small { color:#56657a; font-size:11px; margin-top:3px; }
.ma-audience-footer { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:8px; margin-top:15px; }
.ma-audience-footer button { font:inherit; padding:6px 12px; min-height:34px; border-radius:6px; cursor:pointer; }
.ma-audience-cancel { background:#fff; color:#3c4e65; border:1px solid #d7e0eb; }
.ma-audience-submit { background:#245dcc; border:1px solid #245dcc; color:#fff; font-weight:700!important; }
.ma-audience-submit:hover { background:#1d51b7; }
@media (max-width:560px) {
 .ma-pinbar { margin:6px 8px 3px; gap:3px 6px; flex-wrap:wrap; }
 .ma-pinbar [data-ma-jump] { flex-basis:100%; }
 .ma-pinbar [data-ma-preview] { font-size:12px; }
 .ma-pin-controls { margin-inline-start:auto; }
 .ma-pinbar .ma-pin-controls .ma-btn { min-height:27px; padding-inline:5px; }
 .ma-audience-dialog form { padding:14px; }
}
/* A compact icon rail on desktops; touch widths keep the action names. The
   visually hidden label remains the accessible name for keyboard navigation. */
@media (pointer:fine) and (hover:hover) and (min-width:721px) {
 .ma-strip { gap:2px 3px; }
 .ma-strip .ma-btn:not([aria-pressed="true"]):not([data-done="true"]) { min-width:25px; padding-inline:4px; }
 .ma-strip .ma-btn:not([aria-pressed="true"]):not([data-done="true"]) .ma-label {
   position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); white-space:nowrap;
 }
}
@media (pointer:coarse), (max-width:720px) {
 .ma-strip { gap:1px 3px; }
 .ma-strip .ma-btn, .ma-pinbar .ma-btn { min-height:29px; padding:3px 6px; }
}
@media (prefers-reduced-motion:reduce) { .ma-strip .ma-btn,.ma-pinbar .ma-btn { transition:none; } }
/* Align the same strip with the sender's bubble, without modifying message color. */
#workspace .messages .ma-strip { align-self:flex-start; }
#workspace .messages .message.out .ma-strip { align-self:flex-end; justify-content:flex-end; }
#msgs .message-person-body { min-width:0; }
#msgs .message-person-body > .ma-strip { align-self:flex-start; }
#msgs .message-line.out .message-person-body > .ma-strip { align-self:flex-end; justify-content:flex-end; }
#workspace .messages .quote.ma-quote { display:block; width:100%; min-height:0; text-align:left; justify-content:flex-start; }
#msgs .ma-quote {
  display:block; max-width:100%; text-align:left; color:inherit; background:#ffffff35; border:0;
  border-inline-start:2px solid currentColor; padding:2px 6px; border-radius:4px;
  white-space:pre-wrap; overflow-wrap:anywhere; cursor:pointer;
}
#pinConvBtn[aria-pressed="true"], #moreMask [data-act="pin"][aria-pressed="true"] { color:#215abd; background:#eaf3ff; }
#quoteBar button.x { background:none; color:inherit; border:0; cursor:pointer; }
#items .conv-pinned { flex-shrink:0; font-size:10px; color:#215abd; border-radius:4px; background:#eaf3ff; padding:1px 3px; white-space:nowrap; }