/* Conversation, staff profile and support surfaces. Include after ops.css. */
.mg-thread, .mg-profile, .mg-faq {
  --mg-chat-line: #3d4339;
  --mg-ink-soft: #c0c6b7;
  --mg-inset: #131612;
}
.mg-thread {min-width: 0; margin-block: 18px;}
.mg-thread-head, .mg-notice-head, .mg-profile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 14px;
}
.mg-thread-head {margin-bottom: 10px;}
.mg-thread h3, .mg-profile-section h3, .mg-faq h3 {margin: 0; font-size: 1.13rem; line-height: 1.25;}
.mg-chat-scroll {
  max-height: min(38rem, 66svh);
  overflow-y: auto;
  border: 1px solid var(--mg-chat-line);
  border-radius: 12px;
  background-color: #1b1c17;
  overscroll-behavior: contain;
  overflow-anchor: none;
  scrollbar-color: #656e5d var(--mg-inset);
  scrollbar-width: thin;
}
.mg-chat-list, .mg-pending-files, .mg-tags, .mg-notices, .mg-staff-list {list-style: none; margin: 0; padding: 0;}
.mg-chat-list {display:grid;gap:10px;}
.mg-chat-scroll > :is(.mg-chat-list,.mg-messenger-loading-bubbles) {
  min-height:100%;
  padding:14px;
  background:
    url('/assets/chat-workshop.svg') left bottom / var(--mg-chat-tile,416px) var(--mg-chat-tile,416px) repeat,
    radial-gradient(ellipse 38rem 23rem at 8% 0%,#53432460,transparent),
    linear-gradient(140deg,#292419,#22251c 48%,#191a16);
}
.mg-chat-list > li {min-width: 0; margin: 0;}
.mg-chat-day {display: flex; gap: 10px; align-items: center; justify-content: center; color: #acb3a3; font-size: .82rem;}
.mg-chat-day::before, .mg-chat-day::after {content: ''; flex: 1; height: 1px; background: #33382f;}
.mg-chat-system {
  justify-self: center;
  width: fit-content;
  max-width: 94%;
  padding: 5px 12px;
  border-inline: 2px solid #65634c;
  border-radius: 7px;
  background: #24251ed9;
  color: var(--mg-ink-soft);
  text-align: center;
}
.mg-chat-system :is(div:first-child, details) {font-size: .86rem;}
.mg-chat-system small, .mg-chat-system time {font-size: .8rem;}
.mg-chat-system time {margin-inline-start: 8px; color: #bdc5b3;}
.mg-chat-system p, .mg-bubble p, .mg-notice p, .mg-profile-section p {
  margin: 4px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.mg-chat-system > p {font-size: .94rem;}
.mg-chat-system details {text-align: left;}
.mg-private-note {border-color: #9f8a43; background: #28271c; color: #e9dfb0;}
.mg-message {
  --mg-message-avatar: 49px;
  --mg-message-gap: 9px;
  display: flex; align-items: flex-end; gap: var(--mg-message-gap);
}
.mg-message.mg-mine { flex-direction: row-reverse; }
.mg-message > :is(.mg-avatar,.mg-chat-person-avatar),.mg-message > .mg-chat-person-avatar > .mg-avatar { width:var(--mg-message-avatar); }
.mg-message > :is(.mg-avatar,.mg-chat-person-avatar) { margin-block-end:3px; }
.mg-message-content {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px;
  min-width: 0; max-width: min(calc(100% - var(--mg-message-avatar) - var(--mg-message-gap)), 42rem);
}
.mg-mine .mg-message-content { align-items: flex-end; }
.mg-message-payload {display:flex; flex-direction:column; align-items:inherit; min-width:0; max-width:100%; gap:3px;}
.mg-message-payload:empty {display:none;}
.mg-bubble {
  --mg-bubble-end: #ffe3a0;
  position: relative;
  width: fit-content; max-width: 100%; min-width: 0;
  padding: 6px 12px;
  border: 1px solid #f6d58b; border-radius: 15px 15px 15px 4px;
  background: var(--mg-bubble-end) linear-gradient(165deg, #fff0c9, var(--mg-bubble-end));
  color: #231b0c; box-shadow: 0 2px 5px #11120860, inset 0 1px #fff5;
}
.mg-bubble::after {
  content: ''; position: absolute; inset-block-end: -1px; inset-inline-start: -5px;
  width: 8px; height: 8px; background: var(--mg-bubble-end);
  clip-path: polygon(100% 0, 100% 100%, 0 100%);
}
.mg-bubble > p { margin: 0; }
.mg-bubble > .mg-attachments:first-child { margin-top: 0; }
.mg-mine .mg-bubble {
  --mg-bubble-end: #ffca08;
  border-color: #ffd748; border-radius: 15px 15px 4px 15px;
  background-image: linear-gradient(165deg, #ffdd53, var(--mg-bubble-end));
}
.mg-mine .mg-bubble::after { inset-inline: auto -5px; transform: scaleX(-1); }
.mg-sticker-message .mg-bubble {
  padding: 0;
  border: 0; background: transparent; color: var(--ink); box-shadow: none;
}
.mg-sticker-message .mg-bubble::after { content: none; }
.mg-message-by, .mg-message-meta {
  display: flex; align-items: center; flex-wrap: wrap; gap: 2px 7px;
  color: #c5bea6; line-height: 1.2; overflow-wrap: anywhere;
}
.mg-mine .mg-message-meta { justify-content: flex-end; }
.mg-message-by strong { font-size: .87rem; color: #f2ebd6; }
.mg-message-by span, .mg-message-meta { font-size: .79rem; }
.mg-message-meta time { white-space: nowrap; }

[data-audio-seek] {touch-action:none;}
.mg-message-delivery { display:inline-grid; place-items:center; width:16px; height:17px; color:#c5bea6; }
.mg-message-delivery svg { display:none; width:17px; height:16px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
[data-delivery="sending"] .mg-check-sending,[data-delivery="sent"] .mg-check-sent,
[data-delivery="read"] .mg-check-read,[data-delivery="failed"] .mg-check-failed { display:block; }
.mg-check-read {color:var(--yellow)}
.mg-check-failed {color:#ff9b82}
.mg-avatar {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  align-self: flex-end;
  width: 36px;
  aspect-ratio: 1;
  border: 1px solid #626b56;
  border-radius: 50%;
  color: #e3e7d9;
  background: #333b2c;
  font: 700 1.03rem/1.1 var(--ops-display, 'Open Sans Condensed', sans-serif);
  overflow: hidden;
}
.mg-avatar-master {border-color: #7b6c39; background: #3d3721; color: #ffe27e;}
.mg-avatar-admin, .mg-avatar-owner {border-color: #586e7b; background: #29363d; color: #c4e5f6;}
.mg-avatar-large {align-self: center; width: clamp(58px, 9vw, 83px); font-size: 2rem;}
.mg-avatar img {display: block; width: 100%; height: 100%; object-fit: cover;}
.mg-chat-empty {border: 1px dashed #4b5144; border-radius: 9px; padding: 16px; color: var(--mg-ink-soft); text-align: center;}
.mg-compose {
  display: grid;
  gap: 9px;
  padding: 13px;
  margin-top: 9px;
  border: 1px solid var(--mg-chat-line);
  border-radius: 10px;
  background: #20231c;
}
.mg-compose-row {display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-end; gap:6px;}
.mg-compose-text {display:grid; order:-1; width:100%; min-width:0; gap:4px; font-weight:600;}
.mg-compose-text textarea {min-height:55px; max-height:18rem; padding:8px 10px; resize:vertical;}
.mg-compose-primary {display:grid; flex:none;}
.mg-compose-primary .button, .mg-chat-icon {gap:6px;}
.mg-chat-icon .icon, .mg-compose-primary .icon {width:19px; height:19px; flex:none;}
.mg-compose[data-voice-active] .mg-compose-row {flex-wrap:nowrap;}
.mg-compose[data-voice-active] .mg-compose-row > :is(.mg-file-field,.mg-compose-text,[data-toggle-stickers]) {display:none;}
.mg-compose .form-error {margin:0;}
@media (max-width:750px) {
  .mg-compose {gap:5px; margin-top:0; padding:4px; border-radius:14px;}
  .mg-compose-row {flex-wrap:nowrap; gap:3px;}
  .mg-compose-row .mg-file-field-inline {flex:none; margin-inline-end:0;}
  .mg-compose-text {flex:1; order:0; width:auto;}
  .mg-compose-text textarea {
    min-height:44px; max-height:96px; padding:10px 8px; border:0;
    border-radius:10px; font-size:16px; line-height:22px; resize:none;
  }
  .mg-compose-row :is(.mg-file-trigger,.mg-chat-icon) {
    display:inline-grid; place-items:center; flex:none; width:44px; min-height:44px; padding:0; border-radius:50%;
  }
  .mg-compose-row :is(.mg-file-trigger,.mg-chat-icon,.mg-compose-text) > span {display:none;}
  .mg-pending-files {max-height:120px; overflow:auto;}
  .mg-sticker-picker {grid-template-columns:repeat(5,minmax(0,1fr)); gap:3px;}
}
.mg-pending-files:empty {display: none;}
.mg-pending-files {display: grid; gap: 5px;}
.mg-pending-files li {display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; padding: 3px 6px; background: #2b3026; border-radius: 5px;}
.mg-pending-files span {min-width: 0; color: #d5dbcb; font-size: .87rem; overflow-wrap: anywhere;}
.mg-pending-files button {flex: none; min-height: 34px; color: #ffda73; border: 1px solid transparent; background: transparent; font-size: .87rem;}
.mg-attachments, .mg-portfolio {display: flex; flex-wrap: wrap; gap: 6px; margin-top: 7px;}
.mg-attachment {
  display: flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 6px 8px;
  border: 1px solid #666e5b;
  border-radius: 7px;
  background: #20251e;
  color: #e4e7de;
}
.mg-attachment-image {display: block; width: min(100%, 115px); padding: 0; aspect-ratio: 4/3; overflow: hidden;}
.mg-attachment-image img {display: block; width: 100%; height: 100%; object-fit: cover;}
.mg-attachment-file {font-size: .9rem; overflow-wrap: anywhere;}
.mg-attachment-file svg {color: #f5d46b;}
.mg-attachment-file small {display: block; color: #bbc3b0;}
.mg-presence {display: inline-flex; align-items: center; gap: 5px; color: #c2c8b9; font-size: .86rem;}
.mg-presence-online {color: #b1deb8;}
.mg-presence::before {content: ''; width: 7px; height: 7px; border: 1px solid currentColor; border-radius: 50%;}
.mg-presence-online::before {background: currentColor;}
.mg-profile-head {justify-content: flex-start;}
.mg-profile-head > div {flex: 1; min-width: min(100%, 165px);}
.mg-profile-head small, .mg-staff-list small {display: block; color: var(--ops-subtle, #bbc2b1); font-size: .87rem;}
.mg-profile-head h2 {font-size: clamp(1.8rem, 3.4vw, 3.2rem); line-height: 1.05;}
.mg-tags, .mg-check-tags {display: flex; flex-wrap: wrap; gap: 6px;}
.mg-tags {margin-top: 14px;}
.mg-tags li {
  padding: 4px 10px;
  border: 1px solid #5d674f;
  border-radius: 99px;
  background: #2a3024;
  color: #e0e7d6;
  font-size: .91rem;
}
.mg-profile-section {margin-top: 18px;}
.mg-portfolio {gap: 9px;}
.mg-portfolio .mg-attachment-image {width: clamp(82px, 19vw, 155px);}
.mg-fieldset {min-width: 0; margin: 0; padding: 12px; border: 1px solid #484f41; border-radius: 8px;}
.mg-fieldset legend {padding-inline: 5px; font-weight: 650;}
.mg-check-tags > label, .mg-choice {display: inline-flex; flex-direction: row; align-items: center; gap: 6px; cursor: pointer;}
.mg-check-tags > label {
  min-height: 42px; padding-inline: 9px;
  border: 1px solid #59614f; border-radius: 8px; background: #20251b;
}
.mg-check-tags > label:has(:checked) {border-color: #ad963e; background: #35301c;}
.mg-check-tags input, .mg-choice input[type=checkbox] {width: 1rem; height: 1rem; accent-color: var(--yellow);}
.mg-work-remove {margin: 5px; padding: 4px; font-size: .86rem;}
.mg-work-remove img {width: 36px; height: 32px; object-fit: cover; border-radius: 3px;}
.mg-faq {margin-bottom: 14px;}
.mg-faq h3 {margin-bottom: 7px;}
.mg-faq details {border-bottom: 1px solid var(--mg-chat-line);}
.mg-faq details:last-child {border: 0;}
.mg-faq summary, .mg-chat-system summary {padding-block: 9px; cursor: pointer; font-weight: 650;}
.mg-faq details p {margin: 0 0 11px; color: var(--mg-ink-soft); max-width: 75ch;}
.mg-notices, .mg-staff-list {display: grid; gap: 9px;}
.mg-notice {
  display: grid; gap: 5px; padding: 12px 14px;
  border: 1px solid #404639; border-radius: 9px; background: #1c2019;
}
.mg-notice.mg-unread {border-left: 3px solid var(--yellow);}
.mg-notice-head time {color: #bbc2b1; font-size: .85rem;}
.mg-staff-list li {display: flex; flex-wrap: wrap; align-items: center; gap: 9px; padding-block: 7px; border-bottom: 1px solid #41483a;}
.mg-staff-list li > .mg-avatar {align-self: center;}
.mg-staff-list li > .mg-presence {margin-left: auto;}
.mg-order-footer {margin-block: 20px 0; padding-top: 16px; border-top: 1px solid #5c604e;}
@media (hover: hover) {
  .mg-attachment:hover {border-color:var(--hover-border);}
  .mg-faq summary:hover, .mg-pending-files button:hover {color: var(--yellow);}
}
@media (max-width: 550px) {
  .mg-chat-scroll {--mg-chat-tile:330px}
  .mg-chat-scroll > :is(.mg-chat-list,.mg-messenger-loading-bubbles) {padding:9px 8px}
  .mg-message {--mg-message-avatar: 42px; --mg-message-gap: 7px;}
  .mg-message > .mg-avatar,.mg-message > .mg-chat-person-avatar > .mg-avatar {font-size: .9rem;}
  .mg-bubble {padding: 5px 10px;}
  .mg-profile-head .button {margin-right: auto;}
  .mg-chat-system {max-width: 100%;}
}
.mg-system-amount {display: block; font-size: .91rem;}
.mg-flow-list {max-height: 24rem; overflow: auto; margin: 0; padding: 0 0 0 15px; list-style: none; border-left: 2px solid #545b49; scrollbar-width: thin;}
.mg-flow-list li {padding: 8px 0; border-bottom: 1px solid #3e4438;}
.mg-flow-list li:last-child {border-bottom: none;}
.mg-flow-list li > p, .mg-flow-list small {overflow-wrap: anywhere;}
.mg-flow-meta, .mg-flow-list small {display: flex; flex-wrap: wrap; gap: 4px 11px; color: var(--ops-subtle); font-size: .85rem;}
.mg-flow-list button {min-height: 30px!important; padding: 3px 5px!important; font-size: .87rem;}
.mg-inspection .ops-buttons, .mg-request-row .ops-buttons {margin-top: 7px;}
.mg-request-row {margin-block: 7px; padding-block: 5px;}
.mg-summary-line, .mg-price {display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 6px 13px;}
.mg-price {margin-block: 8px 12px; padding: 12px 14px; border-inline-start: 3px solid var(--yellow); background: #27291e;}
.mg-price strong {font-family: var(--ops-display); font-size: clamp(1.7rem,3vw,2.4rem);}
.mg-pay-info {margin: 6px 0;}
.mg-pay-info dt {font-size: .86rem; color: var(--ops-subtle);}
.mg-pay-info dd {margin: 0; overflow-wrap: anywhere;}
.mg-payment .button {margin-top: 10px;}

.mg-message-edited, .mg-deleted-message { font-style: italic; }
.mg-message-actions { display:flex; justify-content:flex-end; gap:0; margin-inline-end:-6px; }
.mg-message-actions[aria-hidden="true"] {visibility:hidden}
.mg-message-actions button {
  display: grid; place-items: center; width: 29px; min-height: 29px; padding: 0;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: #e2d3a7;
}
.mg-message-actions .icon { width: 16px; height: 16px; }
@media (pointer: fine) {
  .mg-message-actions [data-chat-edit] .icon { translate: 3px 0; }
  .mg-message-actions [data-chat-edit] + [data-chat-delete] .icon { translate: -3px 0; }
}
.mg-message-actions button:hover {border-color:var(--hover-border);color:var(--yellow);}
.mg-message-actions button:focus-visible {outline-offset:1px;}
@media (pointer: coarse) {
  .mg-message-actions button { width: 36px; min-height: 44px; }
  .mg-message-actions [data-chat-edit] .icon { justify-self:end; margin-inline-end:1px; }
  .mg-message-actions [data-chat-edit] + [data-chat-delete] .icon { justify-self:start; margin-inline-start:4px; }
}

.mg-sticker-art { display: block; width: min(100%, 108px); height: auto; aspect-ratio: 1; }
.mg-sticker-message .mg-bubble { width: 108px; }
.mg-sticker-picker {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 85px), 1fr)); gap: 7px;
  scroll-margin-block: 12px;
}
.mg-sticker-picker button {
  display: grid; justify-items: center; align-content: start; gap: 3px; min-width: 0;
  padding: 5px; border: 1px solid #535b49; border-radius: 8px;
  background: #181b16; color: var(--ink); font-size: .84rem; line-height: 1.25;
}
.mg-sticker-picker button:hover {border-color:var(--hover-border);}
.mg-sticker-picker .mg-sticker-art { width: min(100%, 68px); }
.mg-chat-change textarea { min-height: 100px; }
.mg-chat-change .ops-buttons .button { justify-self: auto; }

.mg-voice-playback {
  display: grid; gap: 5px; min-width: 0; width: 265px; max-width: 100%;
}
.mg-voice-message {
  --mg-voice-color:#ffe3a0;
  display:grid; grid-template-columns:40px minmax(0,1fr) auto; align-items:center; gap:5px;
  min-width:0; min-height:44px; padding-inline:3px 10px;
  border-radius:999px; background:var(--mg-voice-color); color:#302406;
}
.mg-mine .mg-voice-message, .mg-voice-preview .mg-voice-message {--mg-voice-color:#ffca08;}
.mg-voice-message button {
  display:grid; place-items:center; width:40px; min-height:44px; padding:0;
  color:inherit; background:none; border:0; border-radius:50%;
}
.mg-voice-message .icon {width:17px; height:17px;}
.mg-voice-message:not([data-playing]) button .icon:last-child,
.mg-voice-message[data-playing] button .icon:first-child {display:none;}
.mg-voice-message [data-audio-time] {min-width:3ch; font-size:.79rem; font-variant-numeric:tabular-nums;}
.mg-voice-message input[type=range] {
  appearance:none; -webkit-appearance:none; width:100%; min-width:0; height:16px; margin:0; padding:0;
  border:0; border-radius:0; color:inherit; background:transparent; box-shadow:none; cursor:pointer;
}
.mg-voice-message input[type=range]:disabled {opacity:.6; cursor:default;}
.mg-voice-message input::-webkit-slider-runnable-track {
  height:4px; border-radius:999px;
  background:linear-gradient(to right,#362909 var(--voice-progress,0%),#36290940 0%);
}
.mg-voice-message input::-moz-range-track {
  height:4px; border-radius:999px;
  background:linear-gradient(to right,#362909 var(--voice-progress,0%),#36290940 0%);
}
.mg-voice-message input::-webkit-slider-thumb {
  -webkit-appearance:none; width:12px; height:12px; margin-top:-4px; border:0;
  border-radius:50%; background:#362909;
}
.mg-voice-message input::-moz-range-thumb {
  width:12px; height:12px; border:0; border-radius:50%; background:#362909;
}
.mg-voice-message {--focus-ring:#362909}
.mg-voice-message :is(button,input):focus-visible {outline-offset:1px;}
.mg-voice-mic {touch-action:none; user-select:none; -webkit-touch-callout:none;}
.mg-voice-mic[aria-pressed="true"] {border-color:var(--yellow); color:var(--yellow); background:#312818;}
.mg-voice {
  display:flex; flex:1; align-items:center; min-width:0; gap:4px;
  border-radius:12px; background:#25241a;
}
.mg-voice-recording {display:flex; flex:1; align-items:center; flex-wrap:wrap; gap:3px 6px; min-width:0;}
.mg-voice-dot {width:8px; height:8px; flex:none; border-radius:50%; background:#f19472;}
.mg-voice-recording time {font-variant-numeric:tabular-nums; font-size:.87rem; color:#e9d298;}
.mg-voice [data-voice-status] {font-size:.75rem; line-height:1.2;}
.mg-voice-preview {flex:1; min-width:0;}
.mg-voice > .button {flex:none; min-width:40px; min-height:44px; padding:0;}
.mg-voice [data-voice-lock] {color:var(--yellow);}
.mg-voice-playback .mg-voice-message {max-width:100%;}


.mg-chat-launch {
  display:flex;align-items:center;gap:.75rem;width:100%;margin-top:1.125rem;padding:.875rem;
  color:var(--ink);text-align:left;border:1px solid #74612c;border-radius:12px;
  background:linear-gradient(120deg,#312918,var(--ops-face));cursor:pointer;
  transition:border-color .18s ease,box-shadow .18s ease,background-color .18s ease;
}
.mg-chat-launch:hover {border-color:var(--hover-border);background:#2b2b22}
.mg-chat-launch-summary {min-width:0;flex:1}
.mg-chat-launch .icon {flex:none;width:23px;height:23px;color:var(--yellow)}
.mg-chat-launch strong,.mg-chat-launch small {display:block}
.mg-chat-launch small {color:var(--ops-subtle);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mg-chat-unread {display:grid;place-items:center;flex:none;min-width:26px;height:26px;padding-inline:5px;border-radius:99px;background:var(--yellow);color:#171400;font-size:.75rem;font-weight:800}
.mg-chat-unread[hidden] {display:none}
.mg-chat-shortcut,.mg-order-chat-tabs button {display:inline-flex;align-items:center;justify-content:center;gap:6px}
.mg-chat-shortcut .mg-chat-unread,.mg-order-chat-tabs .mg-chat-unread {min-width:20px;height:20px;font-size:.68rem}
#order-chat [data-open-order-support] {margin-top:6px}
.mg-chat-launch > span:last-child {margin-left:auto;font-size:1.5rem;color:var(--yellow)}
#order-chat > [data-order-chat-content] {display:none}
html:has(.mg-chat-window[open]) {overflow:hidden;overscroll-behavior:none}
.mg-chat-window[open] {
  display:flex;flex-direction:column;position:fixed;inset:0;
  top:var(--chat-window-top,0px);
  width:100%;height:var(--chat-window-height,100dvh);max-width:none;max-height:none;margin:0;border:0;border-radius:0;
  padding:0 0 max(0px,calc(env(safe-area-inset-bottom) - var(--chat-window-covered,0px)));
  color:var(--ink);background:var(--ops-face);overflow:hidden;
}
.mg-chat-window > header {
  display:flex;align-items:center;gap:14px;padding:8px 10px;
  border-bottom:1px solid var(--ops-border);flex:none;
}
.mg-chat-window h3 {margin:0;font-size:1.1rem}
.mg-chat-window header small {color:var(--ops-subtle)}
.mg-chat-window .mg-chat-window-content {
  display:flex;flex-direction:column;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;padding:0 8px 8px;
}
#order-chat-dialog .mg-order-chat-tabs {display:flex;gap:6px;margin-top:8px;padding:4px;border:1px solid var(--ops-border);border-radius:10px;background:var(--ops-inset)}
.mg-order-chat-tabs button {flex:1;min-height:40px;border:1px solid transparent;border-radius:7px;color:var(--ops-subtle);background:none;font-weight:650}
.mg-order-chat-tabs button[aria-pressed="true"] {border-color:#74612c;color:var(--yellow);background:#302a19}
.mg-order-chat-tabs button:hover {color:var(--yellow)}
.mg-order-chat-pane,.mg-order-chat-pane > [data-help-chat] {display:flex;flex-direction:column;min-height:0;flex:1}
.mg-order-chat-pane[hidden] {display:none}
.mg-order-chat-tools {display:flex;flex-wrap:wrap;gap:4px}
.mg-chat-window .mg-thread {display:flex;flex-direction:column;flex:1;min-height:0;margin-block:8px;gap:8px}
.mg-chat-window .mg-thread-head {display:none}
.mg-chat-people {display:flex;align-items:center;align-self:flex-start;gap:4px;max-width:100%;padding:2px 5px 2px 8px;border:1px solid var(--ops-border);border-radius:999px;background:var(--ops-inset)}
.mg-chat-people-avatars {display:flex;align-items:center}
.mg-chat-people-avatars button + button {margin-inline-start:-4px}
.mg-chat-people-avatars .mg-avatar {width:33px;font-size:.8rem;box-shadow:0 0 0 2px var(--ops-inset)}
.mg-chat-person-avatar {display:inline-flex;flex:none;border:0;padding:0;border-radius:50%;background:none;cursor:pointer}
.mg-message .mg-chat-person-avatar .mg-avatar {width:100%}
.mg-chat-person-avatar:focus-visible {position:relative;z-index:1;outline-offset:2px}
@media (hover:hover) and (pointer:fine) {
  .mg-chat-person-avatar:hover {position:relative;z-index:1;box-shadow:0 0 0 2px var(--hover-border)}
}
.mg-chat-people [data-chat-roster] {min-height:38px;padding:5px 10px;border-radius:999px}
.mg-chat-people [data-chat-roster]::after {content:'›';margin-inline-start:6px;color:var(--yellow)}
.mg-chat-roster-list {display:grid;gap:7px;list-style:none;margin:0;padding:0}
.mg-chat-roster-person {display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;width:100%;padding:10px 12px;border:1px solid var(--ops-border);border-radius:10px;background:var(--ops-inset);text-align:left;overflow-wrap:anywhere}
.mg-chat-roster-person:hover {border-color:var(--hover-border)}
.mg-chat-roster-person small {display:block;color:var(--ops-subtle)}
.mg-chat-roster-person > span:last-child {color:var(--yellow)}
.mg-chat-contacts {margin-top:12px;overflow-wrap:anywhere}
.mg-chat-window .mg-chat-scroll {flex:1;min-height:48px;max-height:none;overscroll-behavior:contain}
.mg-chat-window .mg-chat-list {align-content:end;}
.mg-chat-window .mg-thread > .mg-chat-empty:not([hidden]) {display:grid; flex:1; place-items:center; margin:0;}
.mg-chat-window [data-chat-form] {flex:none}
@media (max-width:750px) {
  .mg-chat-window::backdrop {background:var(--ops-face,#181a16);backdrop-filter:none}
  .mg-chat-window[open]::before {
    content:'';position:absolute;inset:0 auto auto 0;width:0;height:100dvh;visibility:hidden;pointer-events:none;
  }
  .mg-chat-window > header {gap:8px; padding-block:5px;}
  .mg-chat-window .mg-thread {gap:5px; margin-block:5px;}
  .mg-chat-window .mg-order-chat-tools {flex:none;}
  .mg-chat-window .mg-order-chat-tools .button {min-height:34px; padding:3px 6px; font-size:.8rem;}
}
.mg-chat-window textarea {font-size:16px}

.mg-colleague-card {display:flex;flex-direction:column;align-items:flex-start;gap:14px}
.mg-colleague-card .plain-text {margin:0}
.mg-team-person,.mg-avatar-edit {display:flex;align-items:center;gap:12px}
.mg-team-person .mg-avatar {flex:none}
.mg-team-person > div {min-width:0;overflow-wrap:anywhere}
.mg-order-support-history {flex:none;margin-bottom:6px}
#order-chat-dialog .mg-order-support-history .mg-chat-scroll {max-height:min(35vh,240px)}
.mg-order-support-links {flex:none;display:flex;flex-wrap:wrap;gap:6px;margin-block:8px}
.mg-order-support-links [data-support-choices] {display:contents}
.mg-order-support-links button[aria-pressed="true"] {border-color:var(--yellow);color:var(--yellow)}
.mg-team-person small,.mg-avatar-edit small {display:block;color:var(--ops-subtle)}
.mg-profile-specialties {margin:10px 0;padding-inline-start:22px;color:var(--ops-subtle)}
.mg-profile-specialties li::marker {color:var(--yellow)}
.mg-priority ol {display:grid;gap:5px;padding:0 0 0 25px;margin:10px 0}
.mg-priority li {padding:5px 6px 5px 2px}
.mg-priority li > span {display:inline-block;max-width:100%;overflow-wrap:anywhere}
.mg-priority li small {color:var(--yellow)}
.mg-priority-add,.mg-rank-buttons {display:flex;align-items:center;gap:6px}
.mg-priority-add select {min-width:0;flex:1}
.mg-rank-buttons {display:inline-flex;vertical-align:middle;margin-inline-start:8px}
.mg-rank-buttons button {
  width:34px;height:34px;border:1px solid var(--ops-field-border);border-radius:6px;background:var(--ops-inset);color:var(--ink);
}
.mg-rank-buttons button:disabled {opacity:.4}
.mg-master-metrics {margin-block:14px}


.mg-room-block {margin-block:16px;padding:14px;border:1px solid var(--ops-border);border-radius:10px}
.mg-room-block .ops-form {margin-top:14px}
.mg-room-block details {margin-block:12px;color:var(--ops-subtle)}
.mg-room-block summary {color:var(--yellow);cursor:pointer}
.mg-room-block .estimate-row {min-width:0}
.mg-room-members p {overflow-wrap:anywhere}
.mg-room-approvals {margin-top:14px}
.mg-room-more {margin-top:12px}
a.order-row {text-decoration:none;color:inherit}
#order-chat [data-open-team-chat] {margin-top:6px}
#order-chat-dialog .mg-order-chat-tabs button {min-width:0;padding-inline:6px}
.mg-room-members {list-style:none;display:grid;gap:8px;margin:10px 0;padding:0}
.mg-room-members li {display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px;padding:8px;background:var(--ops-inset);border-radius:6px}
.mg-room-members li > div {flex:1 1 150px}
.mg-room-members small {display:block;color:var(--ops-subtle)}
[data-room-edit] {width:100%;padding:10px;border:1px solid var(--ops-border);border-radius:8px}

@media (min-width:751px) {
  .mg-chat-window[open] {
    inset:0; margin:auto; width:min(60rem,calc(100% - 48px));
    height:min(51.25rem,calc(100dvh - 48px)); border:1px solid var(--ops-border); border-radius:16px;
  }
  .mg-chat-window > header { padding:10px 18px; }
  .mg-chat-window .mg-chat-window-content { padding:0 16px 12px; }
}
.mg-message-images { display:flex; flex-wrap:wrap; gap:6px; min-width:0; max-width:100%; }
.mg-mine .mg-message-images { justify-content:flex-end; }
.mg-message-images .mg-attachment-image {
  width:min(100%,clamp(148px,32vw,248px)); flex:0 0 auto;
  border-radius:10px; border-color:#736844; background:#141610;
}
.mg-message-images .mg-attachment-image img { object-fit:contain; }
.mg-message-images {width:fit-content;}
.mg-message-images .mg-attachment-image {inline-size:clamp(110px,34vw,248px);block-size:auto;aspect-ratio:4/3;}
.mg-compose textarea:focus,.mg-compose .mg-file-trigger:focus {border-color:#6b6e5e;box-shadow:none;}
.mg-compose :is(textarea,.mg-file-trigger):focus-visible {outline-offset:1px;}
.mg-thread-toolbar {display:flex;align-items:center;gap:7px;min-width:0;}
.mg-thread-tools {display:flex;align-items:center;gap:3px;margin-inline-start:auto;flex:none;}
.mg-thread-tools .mg-chat-tool {width:38px;min-height:36px;padding:6px;display:grid;place-items:center;}
.mg-chat-tool[aria-pressed="true"] {color:var(--yellow);}
html:has(.mg-compose[data-voice-active]) :where(body,body *) {
  user-select:none;-webkit-user-select:none;-webkit-touch-callout:none;
}
.mg-voice-lock-mark {display:none;}
.mg-compose[data-voice-locked] .mg-voice-recording {
  border-radius:999px;background:#382e15;color:#ffe47d;padding:5px 9px;
}
.mg-compose[data-voice-locked] .mg-voice-lock-mark {display:inline-grid;color:var(--yellow);}
.mg-compose[data-voice-locked] [data-voice-send] {box-shadow:0 0 0 3px #ffcc2130;}
.mg-message-flight {
  position:fixed; pointer-events:none; z-index:50; margin:0; max-width:none;
  align-items:flex-end; will-change:transform,opacity;
}
.mg-message-flight-in-dialog {position:absolute;}

.mg-chat-gallery[open] {
  position:fixed;inset:0;width:100%;height:100dvh;max-width:none;max-height:none;margin:0;
  padding:0;border:0;border-radius:0;background:#0c0d0b;color:var(--ink);
  display:grid;grid-template-rows:auto minmax(0,1fr);overflow:hidden;
}
html:has(.mg-chat-gallery[open]) {overflow:hidden;}
.mg-chat-gallery header {
  display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:max(8px,env(safe-area-inset-top)) max(12px,env(safe-area-inset-right)) 8px max(12px,env(safe-area-inset-left));
}
.mg-chat-window [data-chat-layer][open] {
  position:absolute;inset:0;z-index:80;width:100%;height:100%;max-width:none;max-height:none;margin:0;
}
.mg-chat-profile-layer[open] {
  display:flex;flex-direction:column;overflow:hidden;padding:12px 16px;
  border:0;border-radius:0;background:var(--ops-face,#181a16);color:var(--ink);
}
.mg-chat-profile-layer [data-chat-person-panel] {min-height:0;overflow:auto;overscroll-behavior:contain}
.mg-gallery-stage:focus,.mg-chat-gallery:focus {outline:none}
.mg-chat-gallery :is(button,a):focus-visible,.mg-thread a.mg-attachment-image:focus-visible {outline-offset:1px;}
.mg-chat-window .mg-chat-scroll:focus {outline:none}
.mg-gallery-stage {min-height:0;overflow:hidden;display:grid;place-items:center;touch-action:none;user-select:none;}
.mg-gallery-stage img {display:block;inline-size:100%;block-size:100%;min-inline-size:0;min-block-size:0;object-fit:contain;}
.mg-gallery-stage[data-zoomed] {cursor:grab;}
.mg-chat-gallery > button {position:absolute;top:50%;font:700 28px/1 Arial;background:#23251fd9;}
.mg-chat-gallery > button:disabled {visibility:hidden;}
.mg-chat-gallery [data-gallery-prev] {left:10px;}
.mg-chat-gallery [data-gallery-next] {right:10px;}

#messenger-launch {
  position:fixed;right:max(15px,env(safe-area-inset-right));bottom:max(15px,env(safe-area-inset-bottom));
  z-index:6;display:grid;place-items:center;width:48px;height:48px;padding:0;border-radius:16px;
  border:1px solid #a58322;background:#ffce08;color:#201806;box-shadow:0 5px 20px #0008;
}
#messenger-launch:hover {background:#ffe164;}
#messenger-launch b {
  position:absolute;right:-5px;top:-6px;min-width:21px;padding:2px 4px;border:1px solid #b78724;
  border-radius:99px;background:#22231d;color:#ffdc65;font-size:.72rem;
}
#messenger-dialog {--ops-face:#181a16;--ops-border:#3c4034;}
#messenger-dialog > header {min-height:56px;justify-content:space-between;}
#messenger-dialog > header h3 {min-width:0;flex:1;overflow-wrap:anywhere;}
#messenger-dialog > header [data-messenger-return] {display:none;}
.mg-messenger-layout {display:grid;grid-template-columns:minmax(235px,.67fr) minmax(0,1.33fr);flex:1;min-height:0;}
.mg-messenger-sidebar {
  display:grid;grid-template-rows:auto auto minmax(0,1fr);gap:9px;min-height:0;padding:12px;
  border-inline-end:1px solid var(--ops-border);background:#171914;
}
.mg-messenger-sidebar input {width:100%;min-width:0;}
.mg-messenger-sidebar nav {display:flex;gap:4px;overflow:auto;scrollbar-width:thin;}
.mg-messenger-sidebar nav button {
  flex:none;padding:5px 8px;border:1px solid transparent;border-radius:7px;background:none;color:var(--ops-subtle);font-size:.83rem;
}
.mg-messenger-sidebar nav button[aria-pressed="true"] {border-color:#715e2c;background:#30291a;color:var(--yellow);}
.mg-messenger-sidebar ul {list-style:none;margin:0;padding:0;overflow:auto;overscroll-behavior:contain;}
.mg-messenger-row {
  display:flex;align-items:center;gap:9px;width:100%;min-height:62px;padding:8px 5px;margin-bottom:3px;
  border:1px solid transparent;border-radius:10px;background:none;color:var(--ink);text-align:start;
}
.mg-messenger-row:hover,.mg-messenger-row[aria-current="true"] {background:#29271b;border-color:#55482a;}
.mg-messenger-row .mg-avatar {align-self:center;}
.mg-messenger-text {display:grid;flex:1;min-width:0;}
.mg-messenger-text :is(strong,small) {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.mg-messenger-text small {color:var(--ops-subtle);}
.mg-messenger-avatars {display:flex;flex:none;align-items:center;}
.mg-messenger-avatars .mg-avatar + .mg-avatar {margin-inline-start:-9px;box-shadow:0 0 0 2px #181a16;}
.mg-messenger-row-orders {
  display:grid;justify-items:end;gap:4px;flex:none;max-width:47%;
  color:var(--ops-subtle);font-size:.73rem;font-variant-numeric:tabular-nums;
}
.mg-messenger-order {display:flex;gap:5px;align-items:center;}
.mg-messenger-order > span:first-child {white-space:nowrap;}
.mg-messenger-row-orders .badge {font-size:.72rem;line-height:1.25;}
.mg-messenger-main {display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;}
.mg-messenger-orders {padding:6px 12px 4px;}
.mg-messenger-order-links {display:flex;gap:6px;overflow:auto;scrollbar-width:thin;padding-bottom:3px;}
.mg-messenger-order-links a {
  flex:none;padding:5px 8px;border:1px solid var(--ops-border);border-radius:8px;text-decoration:none;
  color:var(--ink);font-size:.8rem;background:#21231b;
}
.mg-messenger-order-links a:hover {border-color:#a88731;}

[data-messenger-panel] {display:flex;flex:1;flex-direction:column;min-height:0;min-width:0;padding:0 12px 10px;overflow:hidden;}
[data-messenger-panel] > :is([data-help-chat],.mg-thread) {display:flex;flex-direction:column;flex:1;min-height:0;}
[data-messenger-panel] > .mg-chat-empty {margin:auto;width:min(95%,340px);}
.mg-messenger-loading-people,.mg-messenger-loading-composer,.mg-messenger-loading-bubbles i {
  border:1px solid var(--ops-border);background:#2b2e24;border-radius:12px;
}
.mg-messenger-loading-people {width:126px;height:43px;border-radius:999px;flex:none;}
.mg-messenger-loading-composer {height:48px;flex:none;}
.mg-messenger-loading-bubbles {min-height:100%;display:grid;align-content:end;gap:12px;}
.mg-messenger-loading-bubbles i {display:block;width:42%;height:34px;}
.mg-messenger-loading-bubbles i:nth-child(2) {justify-self:end;width:53%;}
.mg-messenger-loading-bubbles i:nth-child(3) {width:34%;}
@media (prefers-reduced-motion:no-preference) {
  .mg-messenger-loading :is(.mg-messenger-loading-people,.mg-messenger-loading-composer,.mg-messenger-loading-bubbles i) {
    animation:mg-messenger-loading-in .18s .12s ease-out both;
  }
  @keyframes mg-messenger-loading-in {from{opacity:0} to{opacity:.68}}
}
@media (min-width:751px) {
  #messenger-dialog[open] {inset:0;margin:auto;width:min(calc(100% - 28px),1100px);height:min(calc(100dvh - 28px),760px);}
}
@media (max-width:750px) {
  #messenger-dialog,.mg-messenger-sidebar ul,#messenger-dialog .mg-chat-scroll {touch-action:pan-y pinch-zoom;}
  #messenger-dialog :is(.mg-messenger-order-links,.mg-messenger-sidebar nav) {touch-action:pan-x;}
  .mg-messenger-layout {display:flex;}
  .mg-messenger-sidebar {flex:1;border-inline-end:0;}
  .mg-messenger-main {display:none;flex:1;}
  [data-messenger-panel],.mg-messenger-orders {padding-inline:8px;}
  .mg-messenger-row-orders .mg-messenger-order {flex-direction:column;align-items:flex-end;gap:2px;}
  #messenger-dialog[data-messenger-active] .mg-messenger-sidebar {display:none;}
  #messenger-dialog[data-messenger-active] .mg-messenger-main {display:flex;}
  #messenger-dialog[data-messenger-active] > header [data-messenger-return] {display:inline-flex;flex:none;}
}
