/* Management: Mesazhet, the staff side of support messaging (js/management/mgmessages.js, #MG#MSG#).
   Three panes: the threads | one thread | the account it is about; at 900px and under they stack.
   Its own file so it rides on any theme; tokens only. Buttons are Hyrjet's .mglog-btn. */
.mgmsg {
    display: grid; grid-template-columns: 352px minmax(0, 1fr);
    height: clamp(520px, calc(100dvh - var(--header-height) - 170px), 900px);
    background: var(--bg-secondary); border: 1px solid var(--border-subtle);
}
.mgmsg-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* --- the list --- */
.mgmsg-list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--border-subtle); }
.mgmsg-list-head { display: flex; flex-direction: column; gap: 10px; padding: 14px 14px 10px; border-bottom: 1px solid var(--border-subtle); }
.mgmsg-title-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mgmsg-h { margin: 0; font-size: 18px; font-weight: 700; }
.mgmsg-new { display: inline-flex; align-items: center; gap: 6px; height: 36px; }
.mgmsg-new svg { width: 15px; height: 15px; }
.mgmsg-boxes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 3px; background: var(--bg-deep); }
.mgmsg-box {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px;
    border: 0; background: transparent; color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
}
.mgmsg-box[aria-selected="true"] { background: var(--bg-tertiary); color: var(--text-primary); font-weight: 700; }
/* The status tabs: an underline and the count, as the management tables' headers read. */
.mgmsg-filters { display: flex; gap: 2px; border-bottom: 1px solid var(--border-subtle); overflow-x: auto; scrollbar-width: none; }
.mgmsg-filters::-webkit-scrollbar { display: none; }
.mgmsg-filter {
    flex: 1 0 auto; padding: 8px 6px 9px; margin-bottom: -1px;
    border: 0; border-bottom: 2px solid transparent; background: transparent;
    color: var(--text-muted); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.mgmsg-filter:hover { color: var(--text-primary); }
.mgmsg-filter[aria-pressed="true"] { color: var(--text-primary); border-bottom-color: var(--accent-green); }
.mgmsg-fn { margin-left: 4px; color: var(--text-muted); font-weight: 600; }
.mgmsg-rows { flex: 1; min-height: 0; overflow-y: auto; }
.mgmsg-rows > .mg-empty, .mgmsg-rows > .mg-placeholder { background: transparent; }
.mgmsg-row {
    width: 100%; display: flex; gap: 10px; padding: 12px 14px;
    border: 0; border-bottom: 1px solid var(--border-subtle); background: transparent;
    color: var(--text-primary); font: inherit; text-align: left; cursor: pointer;
}
.mgmsg-row:hover { background: var(--bg-hover); }
.mgmsg-row.is-sel { background: var(--bg-tertiary); }
.mgmsg-avatar {
    position: relative; flex: 0 0 auto; display: grid; place-items: center; width: 36px; height: 36px;
    border-radius: 50%; background: var(--bg-tertiary); color: var(--text-primary); font-size: 12px; font-weight: 700;
}
.mgmsg-row.is-unread .mgmsg-avatar::after {
    content: ''; position: absolute; top: -1px; right: -1px; width: 10px; height: 10px;
    border-radius: 50%; background: var(--accent-green); border: 2px solid var(--bg-primary);
}
.mgmsg-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.mgmsg-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; }
.mgmsg-name { min-width: 0; font-size: 14px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mgmsg-row.is-unread .mgmsg-name { font-weight: 800; }
.mgmsg-time { flex: 0 0 auto; font-size: 11px; font-weight: 600; color: var(--text-muted); }
.mgmsg-time.is-wait { color: var(--accent-orange); }
.mgmsg-row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; font-size: 11px; color: var(--text-muted); white-space: nowrap; }
/* A thread's status beside its topic, in the status select's colours. */
.mgmsg-sc {
    padding: 1px 6px; font-size: 11px; font-weight: 700;
    color: var(--mgmsg-c, var(--text-secondary)); background: color-mix(in srgb, var(--mgmsg-c, var(--text-muted)) 14%, transparent);
}
.mgmsg-sc.s0, .mgmsg-status.s0 { --mgmsg-c: var(--accent-green); }
.mgmsg-sc.s1, .mgmsg-status.s1 { --mgmsg-c: var(--accent-orange); }
.mgmsg-sc.s2, .mgmsg-status.s2 { --mgmsg-c: var(--accent-odds); }
.mgmsg-sc.s3, .mgmsg-status.s3 { --mgmsg-c: var(--accent-teal-light); }
.mgmsg-preview { font-size: 13px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* A topic's chip; one hue per family. */
.mgmsg-topic {
    display: inline-block; padding: 1px 6px; font-size: 11px; font-weight: 700; white-space: nowrap;
    color: var(--mgmsg-t, var(--text-secondary));
    background: color-mix(in srgb, var(--mgmsg-t, var(--text-muted)) 14%, transparent);
}
.mgmsg-topic.t-settle_error, .mgmsg-topic.t-complaint { --mgmsg-t: var(--accent-red-soft); }
.mgmsg-topic.t-settle_delay, .mgmsg-topic.t-cashout   { --mgmsg-t: var(--accent-orange); }
.mgmsg-topic.t-credit, .mgmsg-topic.t-account         { --mgmsg-t: var(--accent-teal-light); }
.mgmsg-topic.t-slots                                  { --mgmsg-t: var(--casino-live, var(--accent-teal-light)); }
.mgmsg-topic.t-notice                                 { --mgmsg-t: var(--accent-odds); }

/* --- one thread: head | side, body | side, composer | side --- */
.mgmsg-thread {
    display: grid; min-height: 0; min-width: 0;
    grid-template-columns: minmax(0, 1fr) 260px;
    grid-template-rows: auto minmax(0, 1fr) auto;
    grid-template-areas: "head side" "body side" "compose side";
}
.mgmsg-thread.is-solo { grid-template-columns: minmax(0, 1fr); grid-template-areas: "head" "body" "compose"; }
.mgmsg-thread > .mg-empty, .mgmsg-thread > .mg-placeholder, .mgmsg-thread > .mg-skeleton {
    grid-column: 1 / -1; grid-row: 1 / -1; align-self: start; margin: 16px;
}
.mgmsg-thread > .mg-empty { background: transparent; }

.mgmsg-head {
    grid-area: head; display: flex; align-items: center; flex-wrap: wrap; gap: 10px 12px;
    padding: 12px 18px; border-bottom: 1px solid var(--border-subtle);
}
.mgmsg-back {
    display: none; place-items: center; width: 40px; height: 40px; margin-left: -8px; padding: 0;
    border: 0; background: transparent; color: var(--text-primary); cursor: pointer;
}
.mgmsg-back svg { width: 20px; height: 20px; }
.mgmsg-acct { display: none; }
.mgmsg-head-txt { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mgmsg-head-h { margin: 0; font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.mgmsg-head-sub { font-size: 12px; color: var(--text-muted); }
/* The status: a pill in its colour (dot + label + chevron) over a plain <select>, so phones open their own picker. */
.mgmsg-status { position: relative; flex: none; display: flex; }
.mgmsg-status::before, .mgmsg-status::after { content: ''; position: absolute; top: 50%; pointer-events: none; }
.mgmsg-status::before { left: 10px; width: 8px; height: 8px; margin-top: -4px; border-radius: 50%; background: var(--mgmsg-c); }
.mgmsg-status::after {
    right: 11px; width: 6px; height: 6px; margin-top: -5px;
    border-right: 2px solid var(--text-secondary); border-bottom: 2px solid var(--text-secondary); transform: rotate(45deg);
}
.mgmsg-status select {
    -webkit-appearance: none; appearance: none; height: 36px; max-width: 170px; padding: 0 28px 0 24px;
    border: 1px solid var(--mgmsg-c); border-radius: 0; background: color-mix(in srgb, var(--mgmsg-c) 14%, var(--bg-deep));
    color: var(--text-primary); font: inherit; font-size: 13px; font-weight: 700; text-overflow: ellipsis; cursor: pointer;
}
.mgmsg-head .mglog-btn { height: 36px; }
.mgmsg-esc { display: inline-flex; align-items: center; gap: 6px; }
.mgmsg-esc svg { width: 16px; height: 16px; flex: none; }

.mgmsg-body { grid-area: body; min-height: 0; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; background: var(--bg-primary); }
/* A short conversation sits at the foot, above the composer (auto margin collapses when it scrolls). */
.mgmsg-body > :first-child { margin-top: auto; }

/* An attached ticket; its reported selection highlighted under it. */
.mgmsg-tk { flex: 0 0 auto; border: 1px solid var(--border-color); background: var(--bg-secondary); overflow: hidden; }
.mgmsg-tk-head {
    width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 14px;
    border: 0; background: transparent; color: var(--text-primary); font: inherit; text-align: left; cursor: pointer;
}
.mgmsg-tk-head:hover { background: var(--bg-tertiary); }
.mgmsg-tk-nr { font-size: 14px; font-variant-numeric: tabular-nums; }
.mgmsg-arrow { color: var(--text-muted); }
.mgmsg-tk-money { flex: 1 1 auto; font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.mgmsg-tk-open { font-size: 13px; font-weight: 600; color: var(--accent-green); }
.mgmsg-st {
    padding: 2px 6px; font-size: 11px; font-weight: 700;
    color: var(--mgmsg-s, var(--text-secondary));
    background: color-mix(in srgb, var(--mgmsg-s, var(--text-muted)) 14%, transparent);
}
.mgmsg-st.is-pending, .mgmsg-leg.is-pending { --mgmsg-s: var(--accent-odds); }
.mgmsg-st.is-won, .mgmsg-leg.is-won         { --mgmsg-s: var(--accent-teal-light); }
.mgmsg-st.is-lost, .mgmsg-leg.is-lost       { --mgmsg-s: var(--accent-red-soft); }
.mgmsg-st.is-void, .mgmsg-leg.is-void       { --mgmsg-s: var(--text-muted); }
.mgmsg-st.is-cashout, .mgmsg-leg.is-cashout { --mgmsg-s: var(--accent-orange); }
.mgmsg-leg {
    display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr); gap: 8px;
    padding: 8px 14px; border-top: 1px solid var(--border-subtle); font-size: 13px;
    background: color-mix(in srgb, var(--mgmsg-s, var(--text-muted)) 10%, transparent);
    box-shadow: inset 3px 0 0 var(--mgmsg-s, var(--text-muted));
}
.mgmsg-leg-state { text-align: right; font-weight: 600; color: var(--mgmsg-s, var(--text-secondary)); }
.mgmsg-odds { color: var(--accent-odds); }

/* Messages: the other side left, mine right; staff notes dashed; event lines centred. */
.mgmsg-text-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.mgmsg-msg { flex: 0 0 auto; align-self: flex-start; max-width: 75%; display: flex; flex-direction: column; gap: 4px; }
.mgmsg-msg.is-right { align-self: flex-end; align-items: flex-end; }
.mgmsg-who { font-size: 12px; font-weight: 700; color: var(--text-secondary); }
.mgmsg-bubble { padding: 10px 12px; border: 1px solid var(--border-color); background: var(--bg-input); font-size: 14px; line-height: 1.45; }
.mgmsg-msg.is-right .mgmsg-bubble { border-color: transparent; background: var(--accent-teal); color: var(--header-ink); }
.mgmsg-meta { font-size: 11px; color: var(--text-muted); }
.mgmsg-note {
    flex: 0 0 auto; display: flex; flex-direction: column; gap: 4px; padding: 8px 12px;
    border: 1px dashed var(--gray-mid); color: var(--text-secondary); font-size: 13px;
}
.mgmsg-note-l { font-size: 11px; font-weight: 700; color: var(--accent-odds); text-transform: uppercase; letter-spacing: .03em; }
.mgmsg-ev { flex: 0 0 auto; align-self: center; padding: 2px 10px; font-size: 12px; color: var(--text-muted); text-align: center; }

/* The composer. */
.mgmsg-compose {
    grid-area: compose; display: flex; flex-direction: column; gap: 8px;
    padding: 10px 18px 14px; border-top: 1px solid var(--border-subtle); background: var(--bg-secondary);
}
/* My own resolved request (to the level above): a note and "Mesazh i ri" instead of the reply box. */
.mgmsg-compose.is-closed { align-items: center; gap: 10px; text-align: center; }
.mgmsg-closed { margin: 0; font-size: 13px; color: var(--text-secondary); }
/* Quick replies as the management date chips (.rpt-chip), a size down. Desktop shows them; phones fold them. */
.mgmsg-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.mgmsg-quick button {
    height: 30px; padding: 0 12px; border: 0; border-radius: var(--radius-md);
    background: var(--bg-tertiary); color: var(--text-primary); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
}
.mgmsg-quick button:hover { background: var(--bg-hover); }
.mgmsg-quick-t, .mgmsg-chk-s { display: none; }
.mgmsg-compose-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.mgmsg-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-secondary); cursor: pointer; }
.mgmsg-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent-odds); }
.mgmsg-tkf { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
.mgmsg-tkf .mg-input { flex: 0 1 160px; width: 160px; padding: 7px 10px; }
.mgmsg-send-row { display: flex; align-items: flex-end; gap: 8px; }
/* .mg-input is a 220px flex basis; here it takes the row beside "Dërgo". */
.mgmsg-text { flex: 1 1 auto; width: auto; min-width: 0; box-sizing: border-box; min-height: 60px; resize: vertical; font-size: 14px; }

/* The account card: the side column on desktop, the sheet on phones. */
.mgmsg-side {
    grid-area: side; min-height: 0; overflow-y: auto; padding: 18px;
    border-left: 1px solid var(--border-subtle); display: flex; flex-direction: column; gap: 14px;
}
.mgmsg-side[hidden] { display: none; }
.mgmsg-card { display: flex; align-items: center; gap: 12px; }
.mgmsg-card .mgmsg-avatar { width: 48px; height: 48px; font-size: 15px; }
.mgmsg-card-txt { min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 12px; color: var(--text-muted); }
.mgmsg-card-txt b { font-size: 16px; font-weight: 700; color: var(--text-primary); overflow-wrap: anywhere; }
.mgmsg-side-acts { display: flex; flex-direction: column; gap: 6px; }
.mgmsg-side-acts .mglog-btn { text-align: left; }

/* Phones: the account sheet (native <dialog>, top layer) opened by the head's name. */
.mgmsg-sheet {
    width: 100%; max-width: 100%; max-height: 85dvh; margin: auto 0 0; padding: 0;
    border: 0; border-top: 1px solid var(--border-color); border-radius: var(--radius-md) var(--radius-md) 0 0;
    background: var(--bg-secondary); color: var(--text-primary);
}
.mgmsg-sheet::backdrop { background: var(--scrim); }
.mgmsg-sheet-in { display: flex; flex-direction: column; gap: 12px; padding: 8px 16px calc(16px + env(safe-area-inset-bottom, 0px)); }
.mgmsg-sheet-grip { align-self: center; width: 36px; height: 4px; border-radius: var(--radius-sm); background: var(--gray-mid); }
.mgmsg-sheet-head { display: flex; align-items: center; gap: 12px; }
.mgmsg-sheet-head .mgmsg-card { flex: 1; min-width: 0; }
.mgmsg-sheet-x {
    flex: none; display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
    border: 0; border-radius: 50%; background: var(--bg-tertiary); color: var(--text-primary); cursor: pointer;
}
.mgmsg-sheet-x svg { width: 18px; height: 18px; }
.mgmsg-sheet-sub { margin: 0; font-size: 12px; color: var(--text-muted); }
.mgmsg-sheet .mgmsg-side-acts { gap: 0; border-top: 1px solid var(--border-color); }
.mgmsg-sheet .mgmsg-side-acts .mglog-btn {
    display: flex; align-items: center; justify-content: space-between; height: 52px; padding: 0;
    border: 0; border-bottom: 1px solid var(--border-subtle); background: transparent;
    color: var(--text-primary); font-size: 14px; font-weight: 600;
}
.mgmsg-sheet .mgmsg-side-acts .mglog-btn:last-child { border-bottom: 0; }
.mgmsg-sheet .mgmsg-side-acts .mglog-btn::after {
    content: ''; width: 7px; height: 7px; margin-right: 6px;
    border-right: 2px solid var(--text-muted); border-bottom: 2px solid var(--text-muted); transform: rotate(-45deg);
}

/* The unread count on the "Mesazhet" tab and on the two boxes. */
.mgmsg-badge, .mgmsg-n {
    display: inline-block; min-width: 18px; height: 18px; margin-left: 6px; padding: 0 5px; box-sizing: border-box;
    border-radius: 9px; background: var(--accent-green); color: var(--bg-deep);
    font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; vertical-align: 1px;
}
.mgmsg-n { margin-left: 0; }
.mgmsg-n:empty { display: none; }

/* The "Mesazh i ri" dialog (native <dialog>, top layer). */
.mgmsg-dlg {
    width: min(480px, calc(100vw - 32px)); padding: 0;
    border: 1px solid var(--border-color); border-radius: var(--radius-sm);
    background: var(--bg-primary); color: var(--text-primary);
}
.mgmsg-dlg::backdrop { background: var(--scrim); }
.mgmsg-dlg-form { display: flex; flex-direction: column; gap: 12px; padding: 18px; }
.mgmsg-dlg-h { margin: 0; font-size: 17px; font-weight: 700; }
.mgmsg-to { margin: 0; padding: 0; border: 0; display: flex; flex-direction: column; gap: 8px; }
.mgmsg-to legend { margin-bottom: 6px; padding: 0; font-size: 12px; color: var(--text-muted); }
.mgmsg-to label { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.mgmsg-to input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent-green); }
.mgmsg-f { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-muted); }
.mgmsg-f[hidden] { display: none; }
.mgmsg-f .mg-input, .mgmsg-f .mg-select { flex: 0 0 auto; font-size: 14px; }
.mgmsg-f textarea { min-height: 100px; resize: vertical; }
.mgmsg-dlg-err { margin: 0; font-size: 13px; color: var(--accent-red-soft); }
.mgmsg-dlg-acts { display: flex; justify-content: flex-end; gap: 8px; }

/* --- 900px and under: the list, or one thread over the whole screen between the site's header and bottom
   menu (the management head, tabs and dates stay under it). The account is the head's button -> the sheet. --- */
@media (max-width: 900px) {
    .mgmsg { grid-template-columns: minmax(0, 1fr); height: auto; border: 0; }
    .mgmsg.is-thread .mgmsg-list, .mgmsg:not(.is-thread) .mgmsg-thread { display: none; }
    .mgmsg-list { border-right: 0; }
    .mgmsg-rows { overflow: visible; }
    /* 99: over the page, under .top-header / .bottom-nav (100); management's own overlays sit at 1200+. */
    .mgmsg.is-thread .mgmsg-thread {
        position: fixed; top: var(--header-height); bottom: var(--bottom-nav-height); left: 0; right: 0; z-index: 99;
        background: var(--bg-secondary);
    }
    .mgmsg-thread, .mgmsg-thread.is-solo {
        grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto;
        grid-template-areas: "head" "body" "compose";
    }
    .mgmsg-side { display: none; }
    .mgmsg-head { flex-wrap: nowrap; gap: 6px; padding: 8px 8px 8px 2px; }
    .mgmsg-back { display: grid; flex: none; width: 34px; height: 44px; margin-left: 0; }
    .mgmsg-acct {
        flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 10px 0 4px;
        border: 1px solid var(--border-color); border-radius: var(--radius-md); background: var(--bg-deep);
        color: var(--text-primary); font: inherit; text-align: left; cursor: pointer;
    }
    .mgmsg-acct + .mgmsg-head-txt { display: none; }
    .mgmsg-acct .mgmsg-avatar { width: 34px; height: 34px; }
    /* The chevron on the avatar says "this opens something". */
    .mgmsg-acct-dot {
        position: absolute; right: -3px; bottom: -3px; display: grid; place-items: center; width: 16px; height: 16px;
        box-sizing: border-box; border: 2px solid var(--bg-deep); border-radius: 50%; background: var(--accent-green); color: var(--bg-deep);
    }
    .mgmsg-acct-dot svg { width: 9px; height: 9px; }
    .mgmsg-acct-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
    .mgmsg-acct-txt > * { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .mgmsg-acct-txt b { font-size: 14px; }
    .mgmsg-acct-txt span { font-size: 11px; color: var(--text-muted); }
    .mgmsg-status select { height: 44px; max-width: 132px; }
    .mgmsg-head .mgmsg-esc { justify-content: center; width: 44px; height: 44px; padding: 0; }
    .mgmsg-esc-l, .mgmsg-tkf > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .mgmsg-body { padding: 14px 12px; overscroll-behavior: contain; }
    .mgmsg-msg { max-width: 88%; }
    .mgmsg-leg { grid-template-columns: minmax(0, 1fr) auto; }
    .mgmsg-leg > :first-child { grid-column: 1 / -1; }
    .mgmsg-compose { gap: 8px; padding: 8px 10px 10px; }
    .mgmsg-compose:not(.is-quick) .mgmsg-quick { display: none; }
    .mgmsg-quick { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .mgmsg-quick::-webkit-scrollbar { display: none; }
    .mgmsg-quick button { flex: none; height: 32px; white-space: nowrap; }
    .mgmsg-compose-row { flex-wrap: nowrap; gap: 8px; }
    .mgmsg-quick-t {
        flex: none; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px;
        border: 1px solid var(--border-color); border-radius: var(--radius-md); background: transparent;
        color: var(--text-primary); font: inherit; font-size: 12px; font-weight: 700; cursor: pointer;
    }
    .mgmsg-quick-t svg { width: 14px; height: 14px; flex: none; }
    .mgmsg-quick-t svg:first-child { color: var(--accent-green); }
    .mgmsg-quick-t svg:last-child { width: 12px; height: 12px; transform: rotate(180deg); transition: transform .15s; }
    .mgmsg-quick-t[aria-expanded="true"] { border-color: var(--accent-green); }
    .mgmsg-quick-t[aria-expanded="true"] svg:last-child { transform: none; }
    .mgmsg-check { margin-left: auto; gap: 6px; font-size: 12px; }
    .mgmsg-chk-l { display: none; }
    .mgmsg-chk-s { display: inline; }
    .mgmsg-tkf .mg-input { flex: none; width: 84px; height: 32px; box-sizing: border-box; padding: 0 8px; }
    /* 16px: iOS zooms into a smaller field on focus. */
    .mgmsg-text { height: 44px; min-height: 44px; padding: 11px 12px; resize: none; font-size: 16px; }
    .mgmsg-send-row .is-primary { height: 44px; }
}
