/* help : Centre d'aide (FAQ, Poser une question, Mes questions, Questions reçues) — styles propres à ce module,
   chargé après style.css. Aucune couleur nouvelle : uniquement les teintes déjà posées dans :root (style.css). */

.help-head { display: flex; flex-direction: column; gap: 2px; }
.help-search input { max-width: 420px; }
.help-cat { display: flex; align-items: baseline; gap: 4px; margin-top: 4px; }

/* ---- FAQ : questions dépliables (élément natif <details>) ---- */
.faq-list { display: grid; gap: 8px; }
.faq-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 2px 14px; box-shadow: var(--shadow); }
.faq-item summary { cursor: pointer; padding: 12px 0; font-weight: 700; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: '+'; display: inline-block; width: 1.1em; color: var(--brand); font-weight: 800; }
.faq-item[open] summary::before { content: '–'; }
.faq-item .faq-answer { padding: 0 0 14px 1.1em; white-space: pre-wrap; color: var(--muted); }
.faq-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; white-space: normal; }
.faq-actions .btn { text-decoration: none; text-align: center; }
@media (max-width: 480px) { .faq-actions .btn { flex: 1 1 100%; } }

/* ---- Poser une question : suggestion automatique ---- */
.help-suggest-card { background: var(--surface-2); }
.help-suggest-title { font-weight: 700; margin: 0 0 8px; }

/* ---- listes de questions (salarié « Mes questions » et Administrateur « Questions reçues ») ---- */
.help-qlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.help-qrow { width: 100%; display: flex; align-items: center; gap: 12px; text-align: left; padding: 9px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.help-qmain { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.help-qtext { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.help-go { color: var(--muted); font-size: 1.2rem; }

/* Trois statuts généraux : Nouvelle bleu, En cours orange, Archivé gris (teintes de la charte : --k-rest, --alert-orange, --muted). */
.badge.st-new { background: var(--k-rest-bg); color: var(--k-rest); }
.badge.st-in_progress { background: #fde9d3; color: #8a4a0c; }
.badge.st-archived { background: #ecebe6; color: #4c5449; }
/* Dans la messagerie, les statuts restent discrets (pas de couleur de priorité) : même gris neutre pour les trois. */
.mbx .badge.st-new, .mbx .badge.st-in_progress, .mbx .badge.st-archived, .mbx-read .badge.st-new, .mbx-read .badge.st-in_progress, .mbx-read .badge.st-archived { background: var(--surface-2); color: var(--muted); font-weight: 500; }
/* lecture (propre à chaque personne, indépendante du statut) */
.badge.help-read-new { background: var(--badge); color: #fff; }
.badge.help-read-unread { background: var(--surface); color: var(--badge); border: 1px solid var(--badge); }
.badge.help-dir { background: var(--surface-2); color: var(--muted); font-weight: 600; }
.help-qbadges { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; flex: none; }
p.help-qbadges { flex-direction: row; flex-wrap: wrap; margin: 0; }
.help-module { gap: 10px; }
.help-qitem { display: flex; align-items: center; gap: 8px; }
.help-qitem .help-qrow { flex: 1; min-width: 0; }
.help-qitem.is-unread .help-qrow { border-left: 4px solid var(--badge); }
.help-qitem > .help-sel { width: 22px; height: 22px; accent-color: var(--brand); flex: none; }
.help-sel-gap { width: 22px; flex: none; }
.help-quick { flex: none; }
.help-selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; padding: 6px 2px; }
.help-selbar .check-inline input { width: 20px; height: 20px; accent-color: var(--brand); }
.help-counts { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.help-count { font: inherit; font-size: .82rem; font-weight: 700; padding: 2px 10px; border-radius: 999px; border: 0; background: var(--surface-2); color: var(--muted); cursor: pointer; }
.help-count.hc-new { background: var(--k-rest-bg); color: var(--k-rest); }
.help-count.hc-in_progress { background: #fde9d3; color: #8a4a0c; }
.help-failed { display: grid; gap: 6px; padding-left: 18px; }
.help-arch-scope { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }

/* ---- fil de discussion ---- */
.help-thread { display: grid; gap: 10px; margin: 10px 0; }
.help-msg { padding: 10px 12px; border-radius: 12px; background: var(--surface-2); max-width: 90%; }
.help-msg.admin { background: var(--k-rest-bg); }
.help-msg.mine { margin-inline-start: auto; }
.help-msg p { margin: 0; }
.help-msg-from { font-weight: 700; font-size: .82rem; margin-bottom: 2px; }
.help-att a { font-weight: 600; }

/* ---- lot E : demandes reçues, attribution, catégories ---- */
.help-to { display: grid; gap: 8px; }
.help-to-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.help-to-chips:empty { display: none; }
.help-to-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px 4px 12px; border-radius: 999px; background: var(--surface-2); font-weight: 600; }
.help-to-chip .btn-link { font-size: 1.1em; line-height: 1; padding: 2px 6px; }
.help-to-list { display: grid; gap: 2px; max-height: 260px; overflow: auto; padding: 4px; border: 1px solid var(--line); border-radius: 10px; }
.help-to-list:empty { display: none; }
.help-to-row { align-items: flex-start; padding: 6px 4px; }
.req-recipients { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 8px; }
.req-recipients[disabled] { opacity: .55; }
.help-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.help-filters select { max-width: 260px; }
.help-last { font-style: italic; }
.help-unassigned { align-self: flex-start; }
.help-history summary { cursor: pointer; font-weight: 700; }
.help-events { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.help-people { display: grid; gap: 6px; max-height: 50vh; overflow: auto; padding: 4px 2px; }
.help-people .check-inline { align-items: flex-start; }
.help-cats { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.help-cat-card { display: grid; gap: 8px; }
.help-recipients { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---- gestion de la FAQ (Administrateur) ---- */
.help-faq-admin { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }

@media (max-width: 640px) {
  .help-search input { max-width: none; width: 100%; }
  .help-msg { max-width: 100%; }
  .help-filters select { max-width: none; width: 100%; }
  /* téléphone : ligne compacte — pastilles en une rangée au-dessus du texte, « Archiver » dans le coin ; aucun défilement horizontal */
  .help-qitem { position: relative; }
  .help-qitem .help-qrow { flex-wrap: wrap; padding: 8px 10px; gap: 4px 8px; }
  .help-qitem .help-qbadges { flex-direction: row; flex-wrap: wrap; width: 100%; }
  .help-qitem:has(.help-quick) .help-qbadges { padding-right: 76px; }
  .help-qitem .help-qmain { flex: 1 1 0; }
  .help-qitem .help-quick { position: absolute; top: 6px; right: 6px; min-height: 32px; padding: 2px 10px; font-size: .82rem; }
  .help-qbadges .badge { white-space: normal; }
}
.req-rights { grid-template-columns: 1fr; }
.req-people { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.req-meta { display: block; font-weight: 400; }

/* ============================== Messagerie (Demandes › Messagerie) ==============================
   Ordinateur : liste compacte à gauche, lecture et réponse à droite (archives : dossiers personnels en plus, à gauche).
   Téléphone : un écran à la fois (data-mode : folders → list → read), jamais deux colonnes étroites. Teintes de la charte uniquement. */
/* Largeur : toute la zone principale pour tous les écrans (style.css, .app.wide). */
/* Liste ≈ 32 % (confortable : 320 à 540 px), lecture ≈ 68 %. */
.mbx { display: grid; grid-template-columns: clamp(320px, 32%, 540px) minmax(0, 1fr); height: calc(100dvh - 150px); min-height: 520px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.mbx-archive { grid-template-columns: clamp(190px, 15%, 260px) clamp(300px, 28%, 480px) minmax(0, 1fr); }
.mbx.is-loading .mbx-list { opacity: .55; transition: opacity .15s; }
.mbx-listpane { display: flex; flex-direction: column; min-width: 0; min-height: 0; border-right: 1px solid var(--line); }
.mbx-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 10px 6px; }
.mbx-search { flex: 1 1 100%; display: flex; align-items: center; gap: 6px; padding: 0 10px; border: 1px solid var(--line-strong, var(--line)); border-radius: var(--radius-pill, 999px); background: var(--surface); }
.mbx-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.mbx-search .nav-ico { width: 18px; height: 18px; color: var(--muted); flex: none; }
.mbx-search-in { flex: 1; min-width: 0; border: 0 !important; box-shadow: none !important; background: transparent; padding: 8px 0; font: inherit; outline: none; }
.mbx-sort { flex: 1 1 auto; min-width: 0; max-width: 220px; font-size: .88rem; padding: 6px 8px; }
.mbx-quick { display: flex; flex-wrap: wrap; gap: 4px 6px; padding: 0 10px 8px; }   /* les filtres passent à la ligne : jamais coupés ni en débordement */
.mbx-chip { flex: none; font: inherit; font-size: .8rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); cursor: pointer; white-space: nowrap; }
.mbx-chip.on { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.mbx-chip-n { margin-left: 5px; font-weight: 700; }
.mbx-selbar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 6px 10px; background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.mbx-selbar .check-inline input { width: 18px; height: 18px; accent-color: var(--brand); }
.mbx-summary { margin: 0; padding: 2px 12px 6px; }
.mbx-list { list-style: none; margin: 0; padding: 0; overflow-y: auto; flex: 1; min-height: 0; border-top: 1px solid var(--line); }
.mbx-item { position: relative; display: flex; align-items: stretch; border-bottom: 1px solid var(--line); }
.mbx-item:hover { background: var(--surface-2); }
/* Non lu (lecture propre à chaque personne, distincte du statut « Nouvelle ») : fond bleu très pâle, expéditeur et objet en gras, petit point bleu. */
.mbx-item.is-unread { background: var(--unread-bg, #eef4fc); }
.mbx-item.is-unread:hover { background: var(--unread-bg-hover, #e3edfa); }
.mbx-item.is-open { background: var(--brand-soft); box-shadow: inset 3px 0 0 var(--brand); }
.mbx-check { margin: 12px 0 0 10px; width: 18px; height: 18px; flex: none; accent-color: var(--brand); }
.mbx-row.help-qrow { flex: 1; min-width: 0; display: grid; gap: 1px; padding: 9px 34px 9px 12px; text-align: left; background: transparent; border: 0; border-radius: 0; box-shadow: none; cursor: pointer; font: inherit; color: inherit; }
.mbx-row:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }
.mbx-l1 { display: flex; align-items: center; gap: 6px; min-width: 0; }
.mbx-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: transparent; }
.is-unread .mbx-dot { background: var(--unread-dot, #2f6fd6); }
.mbx-who { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .92rem; }
.mbx-date { flex: none; font-size: .78rem; color: var(--muted); }
.is-unread .mbx-who, .is-unread .mbx-subj { font-weight: 700; color: var(--ink); }
.is-unread .mbx-date { font-weight: 600; color: var(--unread-dot, #2f6fd6); }
.mbx-att { display: inline-flex; color: var(--muted); flex: none; }
.mbx-att .nav-ico { width: 14px; height: 14px; }
.mbx-subj { padding-left: 14px; font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbx-prev { padding-left: 14px; font-size: .84rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.mbx-l4 { padding-left: 14px; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: center; font-size: .74rem; color: var(--muted); margin-top: 2px; }
/* Statuts de traitement (Nouvelle, En cours, Archivé) : discrets, sans couleur de priorité ; la lecture prime visuellement. */
.mbx-st { font-weight: 400; color: var(--muted); }
.mbx-st::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; border: 1px solid currentColor; vertical-align: 1px; }
.mbx-st.st-in_progress::before { background: currentColor; opacity: .55; }
.mbx-st.st-archived::before { border-style: dashed; }
.mbx-infolder { display: inline-flex; align-items: center; gap: 3px; }
.mbx-infolder .nav-ico { width: 13px; height: 13px; }
.mbx-star { position: absolute; top: 30px; right: 6px; width: 28px; height: 28px; display: grid; place-items: center; border: 0; background: transparent; color: var(--line-strong, #b9bfb6); cursor: pointer; border-radius: 50%; }
.mbx-star .nav-ico { width: 17px; height: 17px; }
.mbx-star:hover { color: var(--muted); background: var(--surface); }
.mbx-star.on { color: #c98a00; }
.mbx-star.on .nav-ico, .mbx-ibtn.on .nav-ico { fill: currentColor; }
/* Épingle personnelle : visible au survol ou au clavier, toujours visible quand épinglée et sur écran tactile. */
.mbx-pin { position: absolute; top: 4px; right: 6px; width: 28px; height: 26px; display: grid; place-items: center; border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 50%; opacity: 0; }
.mbx-pin .nav-ico { width: 16px; height: 16px; }
.mbx-item:hover .mbx-pin, .mbx-pin:focus-visible, .mbx-pin.on { opacity: 1; }
.mbx-pin:hover { background: var(--surface); color: var(--ink); }
.mbx-pin.on { color: var(--brand); }
.mbx-pin.on .nav-ico { fill: currentColor; }
@media (hover: none) { .mbx-pin { opacity: .55; } .mbx-pin.on { opacity: 1; } }
.mbx-sect { padding: 6px 12px 3px; font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); background: var(--surface); border-bottom: 1px solid var(--line); }
.mbx-empty { padding: 28px 16px; text-align: center; }
.mbx-more { margin: 10px auto; display: block; }
.mbx-more[hidden] { display: none; }

/* ---- panneau de lecture ---- */
.mbx-read { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.mbx-none { margin: auto; text-align: center; color: var(--muted); padding: 24px; }
.mbx-none .nav-ico { width: 44px; height: 44px; opacity: .45; }
.mbx-none[hidden], .mbx-conv[hidden] { display: none; }
.mbx-conv { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.mbx-head { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 8px 12px; padding: 12px 16px 10px; border-bottom: 1px solid var(--line); }
.mbx-title { flex: 1 1 280px; min-width: 0; }
.mbx-title h2 { margin: 0 0 2px; font-size: 1.12rem; overflow-wrap: anywhere; }
.mbx-title p { margin: 0 0 3px; }
.mbx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.mbx-ibtn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--ink); cursor: pointer; }
.mbx-ibtn:hover { background: var(--surface-2); border-color: var(--line); }
.mbx-ibtn .nav-ico { width: 18px; height: 18px; }
.mbx-ibtn.on { color: #c98a00; }
.mbx-ibtn[aria-expanded=true] { background: var(--brand-soft); }
.mbx-ibtn-lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mbx-danger { color: var(--bad, #b42318); }
.mbx-folder-pick { max-width: 210px; font-size: .86rem; padding: 5px 8px; }
.mbx-back { display: none; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--brand); font: inherit; font-weight: 600; padding: 6px 4px; cursor: pointer; }
.mbx-back .nav-ico { width: 20px; height: 20px; }
.mbx-info { padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.mbx-info[hidden] { display: none; }
.mbx-dl { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 16px; margin: 0 0 8px; }
.mbx-dl dt { font-size: .74rem; color: var(--muted); font-weight: 700; }
.mbx-dl dd { margin: 0; font-size: .9rem; overflow-wrap: anywhere; }
.mbx-thread { flex: 1; min-height: 0; overflow-y: auto; margin: 0; padding: 14px 16px; align-content: start; }
.mbx-msg { max-width: min(920px, 88%); }
.mbx-msg .help-msg-from { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2px 12px; }
.mbx-msg .rt-view { overflow-wrap: anywhere; }
.mbx-older { justify-self: center; }
.mbx-atts, .mbx-files { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 4px; }
.mbx-atts li, .mbx-file { display: flex; align-items: center; gap: 8px; min-width: 0; }
.mbx-attlink { display: inline-flex; align-items: center; gap: 4px; min-width: 0; max-width: 100%; font-weight: 600; }
.mbx-atts .nav-ico, .mbx-file .nav-ico { width: 15px; height: 15px; flex: none; }
.mbx-fname { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbx-file .mbx-fname { flex: 1; }
.mbx-foot { border-top: 1px solid var(--line); padding: 10px 16px 12px; background: var(--surface); }
.mbx-reply { display: grid; gap: 6px; }
.mbx-reply .rt-area { max-height: 32vh; overflow-y: auto; }
.mbx-reply-bar { display: flex; align-items: center; gap: 8px; }
.mbx-reply-bar .btn-primary { margin-left: auto; }
.mbx-draft { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbx-read-modal { min-height: 60vh; max-height: 80vh; }
.mbx-read-modal .mbx-back { display: inline-flex; }

/* ---- dossiers personnels (archives) ---- */
.mbx-folders { border-right: 1px solid var(--line); overflow-y: auto; padding: 10px 6px; background: var(--surface-2); min-height: 0; }
.mbx-fold-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 6px 8px; }
.mbx-fold-head h2 { margin: 0; font-size: 1rem; }
.mbx-fold-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.mbx-fold { display: flex; align-items: center; border-radius: 8px; }
.mbx-fold.on { background: var(--brand); }
.mbx-fold.on .mbx-fold-btn, .mbx-fold.on .mbx-fold-menu { color: var(--on-brand); }
.mbx-fold:not(.on):hover { background: var(--surface); }
.mbx-fold-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; padding: 7px 8px; border: 0; background: transparent; font: inherit; font-size: .9rem; color: inherit; text-align: left; cursor: pointer; }
.mbx-fold.lvl-1 .mbx-fold-btn { padding-left: 26px; font-size: .86rem; }
.mbx-fold-btn .nav-ico { width: 16px; height: 16px; flex: none; }
.mbx-fold-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mbx-fold-n { font-size: .76rem; color: inherit; opacity: .75; }
.mbx-fold-menu { border: 0; background: transparent; padding: 4px 8px; cursor: pointer; font-weight: 700; color: var(--muted); border-radius: 6px; }
.mbx-fold-hint { padding: 8px; }
.mbx-folder-back { display: none; }
.mbx-inline { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

@media (max-width: 1180px) {
  .mbx { grid-template-columns: clamp(290px, 38%, 380px) minmax(0, 1fr); }
  .mbx-archive { grid-template-columns: 170px clamp(260px, 34%, 340px) minmax(0, 1fr); }
}
/* Largeur RÉELLEMENT disponible (correctifs du 21/11/2026) : la place dépend aussi du menu latéral (déplié ou replié), que les requêtes
   sur l'écran ne voient pas. Sous 900 px de messagerie (tablette en paysage menu déplié, petite fenêtre), les archives passent sur deux
   colonnes : les dossiers au-dessus de la liste, la lecture garde l'essentiel de la largeur. */
.help-module { container-type: inline-size; container-name: messagerie; }
@media (min-width: 761px) {
  @container messagerie (max-width: 900px) {
    .mbx-archive { grid-template-columns: clamp(260px, 38%, 340px) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
      grid-template-areas: "dossiers lecture" "liste lecture"; }
    .mbx-archive > .mbx-folders { grid-area: dossiers; max-height: 210px; overflow: auto; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
    .mbx-archive > .mbx-listpane { grid-area: liste; }
    .mbx-archive > .mbx-read { grid-area: lecture; }
  }
}
/* Tablette en portrait : dossiers au-dessus (repliables par le mode), liste et lecture côte à côte. */
@media (min-width: 761px) and (max-width: 960px) {
  .mbx-archive { grid-template-columns: 150px minmax(240px, 40%) minmax(0, 1fr); }
}
/* Téléphone (et petite tablette) : un écran à la fois, avec retour ; la réponse reste au bas de l'écran. */
@media (max-width: 760px) {
  .mbx, .mbx-archive { display: block; height: auto; min-height: 0; border: 0; box-shadow: none; background: transparent; overflow: visible; }
  .mbx[data-mode=list] .mbx-read, .mbx[data-mode=list] .mbx-folders,
  .mbx[data-mode=read] .mbx-listpane, .mbx[data-mode=read] .mbx-folders,
  .mbx[data-mode=folders] .mbx-listpane, .mbx[data-mode=folders] .mbx-read { display: none; }
  .mbx-listpane, .mbx-folders { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
  .mbx-folders { padding: 10px 6px; }
  .mbx-fold-btn { min-height: 44px; }
  .mbx-tools { padding: 8px; }
  .mbx-sort { max-width: none; flex: 1 1 0; }
  .mbx-list { overflow: visible; }
  .mbx-row.help-qrow { padding: 10px 40px 10px 10px; }
  .mbx-star { top: 32px; width: 36px; height: 36px; }
  .mbx-pin { top: 0; width: 36px; height: 34px; }
  .mbx-folder-back { display: inline-flex; align-items: center; gap: 4px; border: 0; background: transparent; color: var(--brand); font: inherit; font-weight: 600; padding: 6px 2px; cursor: pointer; max-width: 100%; }
  .mbx-folder-back .nav-ico { width: 18px; height: 18px; }
  .mbx-read { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); min-height: calc(100dvh - 130px); }
  .mbx-conv { height: auto; }
  .mbx-head { position: sticky; top: 0; z-index: 2; background: var(--surface); padding: 8px 10px; border-radius: var(--radius) var(--radius) 0 0; }
  .mbx-back { display: inline-flex; flex: 1 1 100%; }
  .mbx-title { flex-basis: 100%; }
  .mbx-actions { width: 100%; }
  .mbx-ibtn { width: 40px; height: 40px; }
  .mbx-folder-pick { max-width: 100%; flex: 1 1 100%; }
  .mbx-thread { overflow: visible; padding: 10px; }
  .mbx-msg { max-width: 100%; }
  .mbx-foot { position: sticky; bottom: 0; z-index: 2; padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); border-radius: 0 0 var(--radius) var(--radius); box-shadow: 0 -4px 12px rgba(0,0,0,.05); }
  .mbx-reply .rt-area { max-height: 26vh; }
  .mbx-none { display: none; }
}
