/* O modo chat do demo, igual ao do app (LunaApp/src/chat): o trilho de 80, a coluna de 256 com o
   banner do céu, a conversa com os blocos de trabalho e o campo. Medidas de kit.rs, rail.rs,
   list.rs, head.rs, conversation.rs, work.rs e composer.rs, tema claro. Prefixo x-.
   No celular, o app do iPhone (Phone/): o início com os canais em cartões, a conversa empilhada
   e a barra de abas. Prefixo m-. */

.chx { position: absolute; inset: 0; display: grid; grid-template-columns: 80px 256px minmax(0, 1fr); background: var(--chat); --hover: #0000000b; --active: #00000014; }
.chx[hidden] { display: none; }
.chx button { font: inherit; color: inherit; }
.x-sp { flex: 1; min-width: 6px; }
/* as dicas daqui são a .x-tip, desenhada por cima de tudo (o ::after do canvas seria cortado pelas colunas) */
.chx [data-tip]:hover::after { content: none; display: none; }
.x-tip { position: absolute; left: 0; top: 0; z-index: 30; max-width: 260px; padding: 5px 9px; border-radius: 8px; background: var(--ink); color: #fff; font: 700 11.5px/1.3 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; opacity: 0; transition: opacity .12s; box-shadow: 0 6px 16px #29222c33; }
.x-tip.is-on { opacity: 1; }

/* o loader de pixel: 8 quadradinhos em volta de um vazio, a cabeça rosa correndo (kit::loader) */
.x-ld { --c: 3px; --g: 1px; position: relative; flex: none; display: inline-grid; grid-template-columns: repeat(3, var(--c)); grid-template-rows: repeat(3, var(--c)); gap: var(--g); }
.x-ld i { background: var(--ink); opacity: .22; animation: x-ld .8s step-end infinite; }
.x-ld.is-dark i { background: #FEF1D0; }
.x-ld i:nth-child(1) { grid-area: 1 / 1; animation-delay: -.8s; }
.x-ld i:nth-child(2) { grid-area: 1 / 2; animation-delay: -.7s; }
.x-ld i:nth-child(3) { grid-area: 1 / 3; animation-delay: -.6s; }
.x-ld i:nth-child(4) { grid-area: 2 / 3; animation-delay: -.5s; }
.x-ld i:nth-child(5) { grid-area: 3 / 3; animation-delay: -.4s; }
.x-ld i:nth-child(6) { grid-area: 3 / 2; animation-delay: -.3s; }
.x-ld i:nth-child(7) { grid-area: 3 / 1; animation-delay: -.2s; }
.x-ld i:nth-child(8) { grid-area: 2 / 1; animation-delay: -.1s; }
@keyframes x-ld { 0% { background: var(--pink); opacity: 1; } 12.5% { background: var(--ink); opacity: .7; } 25% { opacity: .45; } 37.5%, 100% { opacity: .22; } }
.x-ld.is-dark i { animation-name: x-ld-dark; }
@keyframes x-ld-dark { 0% { background: var(--pink); opacity: 1; } 12.5% { background: #FEF1D0; opacity: .7; } 25% { opacity: .45; } 37.5%, 100% { opacity: .22; } }

/* o ponto de presença no canto do rosto, com o anel da cor de trás (kit::presence) */
.x-pr { position: absolute; right: -3px; bottom: -3px; width: 15px; height: 15px; border-radius: 50%; background: var(--ring, var(--bg)); display: grid; place-items: center; }
.x-pr::before { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--ok); display: grid; }
.x-pr.is-work::after { content: ''; position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--ring, var(--bg)); animation: x-breath 1.4s ease-in-out infinite; }
@keyframes x-breath { 50% { transform: scale(.4); } }
.x-pix { width: 100%; height: 100%; display: block; }

/* ---------- o trilho (rail.rs) ---------- */
.x-rail { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 14px 0 4px; background: var(--rail); min-height: 0; overflow: hidden; }
.x-rail hr { width: 32px; height: 2px; flex: none; border: 0; border-radius: 1px; background: var(--line); margin: 0; }
.x-office { width: 40px; height: 40px; flex: none; border: 0; padding: 0; border-radius: 50%; background: var(--raised); display: grid; place-items: center; cursor: pointer; transition: border-radius .18s var(--ease), background .15s; }
.x-office img { width: 28px; height: 28px; }
.x-office:hover { border-radius: 12px; background: var(--pink); }
.x-rws { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; min-height: 0; overflow-y: auto; scrollbar-width: none; flex: 0 1 auto; }
.chx.no-ws .x-rws, .chx.no-ws .x-rws + hr { display: none; }
.d-face { position: relative; width: 40px; height: 40px; flex: none; border: 0; padding: 0; border-radius: 50%; display: grid; place-items: center; background: var(--c, var(--raised)); color: #fff; font: 800 16px var(--sans); cursor: pointer; transition: border-radius .18s var(--ease); }
.d-face img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; object-fit: cover; background: #fff; }
.d-face:hover, .d-face[aria-current="true"] { border-radius: 12px; }
.d-face::before { content: ''; position: absolute; left: -20px; top: 10px; width: 4px; height: 20px; border-radius: 0 4px 4px 0; background: var(--ink); opacity: 0; transition: opacity .15s, height .15s, top .15s; }
.d-face:hover::before { opacity: 1; }
.d-face[aria-current="true"]::before { opacity: 1; top: 2px; height: 36px; background: var(--pink); }
.d-face.is-add { background: var(--raised); color: var(--ok); }
.d-face.is-add:hover { background: var(--ok); color: #fff; }
.d-face.is-add .ic { width: 18px; height: 18px; }
.x-fbusy { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; border-radius: 6px; background: var(--rail); display: grid; place-items: center; }
.x-mode { position: relative; width: 34px; height: 34px; flex: none; border: 0; padding: 0; border-radius: 50%; background: var(--raised); color: var(--ink2); display: grid; place-items: center; cursor: pointer; transition: border-radius .18s var(--ease), background .15s, color .15s; }
.x-mode .ic { width: 15px; height: 15px; }
.x-mode:hover { border-radius: 10px; background: var(--pink); color: #fff; }
.x-mode.is-on { border-radius: 10px; background: var(--pink); color: #fff; }
.x-mode.is-on::before { content: ''; position: absolute; left: -23px; top: 5px; width: 4px; height: 24px; border-radius: 0 4px 4px 0; background: var(--pink); }
.x-rws + hr { margin-top: auto; }

/* ---------- a coluna do workspace (list.rs) ---------- */
.x-list { display: flex; flex-direction: column; min-height: 0; background: var(--bg); border-right: 1px solid #0000000f; }
.x-ban { position: relative; height: 132px; flex: none; overflow: hidden; background: #03082a; }
.x-sky { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.x-ban::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, #0000000d, #0000008c); pointer-events: none; }
.x-ban-t { position: absolute; left: 14px; right: 48px; bottom: 12px; z-index: 1; display: flex; flex-direction: column; gap: 5px; }
.x-ban-t strong { font: 400 24px/29px var(--pixel); color: #FEF1D0; text-shadow: 0 2px 0 #00000080; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-ban-l { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 800; color: #ffffffc0; }
.x-ban-m { position: absolute; right: 14px; bottom: 12px; z-index: 1; width: 26px; height: 26px; border: 0; border-radius: 8px; background: #00000059; color: #fff !important; display: grid; place-items: center; cursor: pointer; }
.x-ban-m:hover { background: #0000008c; }
.x-ban-m .ic { width: 13px; height: 13px; }
.x-lsc { flex: 1; min-height: 0; overflow-y: auto; padding: 8px 8px 12px; border-top: 1px solid #0000000f; }
.x-cat-h { display: flex; align-items: center; gap: 4px; padding: 16px 6px 5px 4px; }
.x-cat:first-child .x-cat-h { padding-top: 10px; }
.x-cat-t { flex: 1; display: flex; align-items: center; gap: 4px; border: 0; padding: 0; background: none; color: var(--ink3) !important; font: 800 12px var(--sans) !important; cursor: pointer; text-align: left; }
.x-cat-t:hover { color: var(--ink2) !important; }
.x-cat-t .ic { width: 10px; height: 10px; transition: rotate .15s; }
.x-cat-t[aria-expanded="false"] .ic { rotate: -90deg; }
.x-cat-add { width: 18px; height: 18px; border: 0; padding: 0; border-radius: 5px; background: none; color: var(--ink3) !important; display: grid; place-items: center; cursor: pointer; }
.x-cat-add:hover { color: var(--ink) !important; background: var(--hover); }
.x-cat-add .ic { width: 12px; height: 12px; }
.x-row { display: flex; align-items: center; gap: 8px; width: 100%; height: 34px; margin: 1px 0; padding: 0 8px; border: 0; border-radius: 9px; background: none; text-align: left; cursor: pointer; color: var(--ink3) !important; font: 750 14.5px var(--sans) !important; }
.x-row:hover { background: var(--hover); color: var(--ink2) !important; }
.x-row[aria-current="true"] { background: var(--active); color: var(--ink) !important; }
.x-row.is-bold { color: var(--ink) !important; font-weight: 800 !important; }
.x-rn { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-ri { width: 20px; flex: none; display: grid; place-items: center; color: var(--ink3); }
.x-ri .ic { width: 13px; height: 13px; }
.x-hash { width: 20px; flex: none; text-align: center; font: 800 17px var(--sans); color: var(--ink3); }
.x-row[aria-current="true"] .x-hash { color: var(--pink); }
.x-wa { display: grid; color: var(--ink3); }
.x-wa .ic { width: 11px; height: 11px; }
.x-rf { position: relative; width: 24px; height: 24px; flex: none; }
.x-rf img { width: 100%; height: 100%; border-radius: 50%; background: var(--raised); display: block; }
.x-rf .x-pr { width: 13px; height: 13px; right: -3px; bottom: -3px; }
.x-rf .x-pr::before { width: 8px; height: 8px; }
.x-rf .x-pr.is-work::after { width: 4px; height: 4px; }
.x-row .count, .m-row .count, .m-chan .count { flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--pink); color: #fff; font: 800 11px/18px var(--sans); text-align: center; }
.x-live { color: var(--ink2) !important; }
.x-live .x-ri { color: var(--ok); }
.x-wk { display: flex; align-items: center; gap: 8px; width: calc(100% - 28px); margin: 0 0 2px 28px; padding: 4px 6px; border: 0; border-radius: 6px; background: none; text-align: left; cursor: pointer; }
.x-wk:hover { background: var(--hover); }
.x-wk img { width: 26px; height: 26px; flex: none; border-radius: 50%; box-shadow: 0 0 0 2px var(--ok); background: var(--raised); }
.x-wk span { min-width: 0; display: flex; flex-direction: column; }
.x-wk b { font-size: 13px; font-weight: 750; color: var(--ink2); }
.x-wk small, .x-wk b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-wk small { font-size: 11.5px; font-weight: 750; color: var(--ink3); }
.x-none { padding: 16px 8px; font-size: 12.5px; font-weight: 650; color: var(--ink3); }
.x-owner { flex: none; padding: 0 8px 8px; }
.x-owner button { width: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 0; border-radius: 14px; background: var(--raised); text-align: left; cursor: pointer; }
.x-owner button:hover { background: #ECECE9; }
.x-of { position: relative; width: 34px; height: 34px; flex: none; border-radius: 50%; background: #E2E1DD; }
.x-of .x-pix { border-radius: 50%; }
.x-owner b { display: block; font-size: 13.5px; font-weight: 800; }
.x-owner small { display: block; font-size: 11.5px; font-weight: 750; color: var(--ink3); }

/* ---------- a conversa ---------- */
.x-main { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.x-head { height: 52px; flex: none; display: flex; align-items: center; gap: 8px; padding: 0 12px 0 18px; border-bottom: 1px solid var(--line); }
.x-back { display: none; }
.x-hface { position: relative; width: 26px; height: 26px; flex: none; }
.x-hface img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.x-hface .x-pr { width: 13px; height: 13px; }
.x-hface .x-pr::before { width: 8px; height: 8px; }
.x-head .x-hash { width: auto; font-size: 16px; }
.x-hn { min-width: 0; flex: 0 0 auto; max-width: 220px; }
.x-hn strong { display: block; font-size: 15.5px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-hn small { display: none; }
.x-vr { width: 1px; height: 22px; flex: none; margin: 0 4px; background: var(--line2); }
.x-topic { min-width: 0; flex: 0 1 auto; font-size: 13px; font-weight: 750; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-keys { display: flex; align-items: center; gap: 8px; flex: 0 1 auto; min-width: 0; }
.x-tail { display: contents; }
.x-key { width: 30px; height: 30px; flex: none; border: 0; padding: 0; border-radius: 8px; background: none; color: var(--ink2) !important; display: grid; place-items: center; cursor: pointer; }
.x-key:hover { background: var(--hover); color: var(--ink) !important; }
.x-key .ic { width: 15px; height: 15px; }
.x-cap { height: 30px; flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 0 10px; border: 1px solid var(--stroke); border-radius: 9px; background: var(--raised); color: var(--ink2) !important; font: 750 11.5px var(--sans) !important; cursor: pointer; white-space: nowrap; }
.x-cap:hover { background: #EAEAE7; color: var(--ink) !important; }
.x-cap .ic { width: 11px; height: 11px; }
.x-week { height: 23px; padding: 0 9px; gap: 6px; border-radius: 999px; background: var(--surface); color: var(--ink) !important; font-weight: 800 !important; font-size: 10.5px !important; }
.x-week .ic { width: 12px; height: 12px; }
.x-lead .ic { width: 9px; height: 9px; }
.x-branch { height: 26px; max-width: 220px; min-width: 0; flex: 0 1 auto; display: inline-flex; align-items: center; gap: 5px; padding: 0 9px; border: 1px solid #FFB8D0; border-radius: 8px; background: var(--pink-soft); color: var(--pink-ink) !important; cursor: pointer; }
.x-branch:hover { border-color: var(--pink); }
.x-branch .ic { width: 11px; height: 11px; flex: none; }
.x-branch span { font: 500 11px var(--mono); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-cf { display: flex; }
.x-cf > * { width: 22px; height: 22px; border-radius: 50%; padding: 1.5px; background: var(--chat); }
.x-cf > * + * { margin-left: -6px; }
.x-cf span { display: grid; place-items: center; }
.x-cf span .ic { width: 19px; height: 19px; padding: 4px; border-radius: 50%; background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); color: var(--ink2); }
.x-cf img { background: var(--raised); }
.x-search { width: 168px; height: 30px; flex: none; display: flex; align-items: center; gap: 6px; padding: 0 9px; border-radius: 9px; background: var(--raised); border: 1px solid transparent; transition: width .2s var(--ease); cursor: text; }
.x-search:focus-within { width: 240px; border-color: var(--line2); background: var(--surface); }
.x-search .ic { width: 12px; height: 12px; flex: none; color: var(--ink3); order: 2; }
.x-search input { flex: 1; min-width: 0; border: 0; outline: 0; padding: 0; background: transparent; font: 650 12px var(--sans); color: var(--ink); user-select: text; -webkit-user-select: text; }
.x-search input::placeholder { color: var(--ink3); }
.x-search input::-webkit-search-cancel-button { display: none; }

.x-feed.d-feed { padding: 16px 0 16px; gap: 0; font-size: 14.5px; }
.x-day { display: flex; align-items: center; gap: 10px; padding: 6px 18px 6px; font-size: 11.5px; font-weight: 800; color: var(--ink3); }
.x-day i { flex: 1; height: 1px; background: var(--line); }
.x-msg { display: flex; align-items: flex-start; gap: 14px; padding: 3px 56px 3px 18px; margin-top: 14px; animation: d-in .28s var(--ease); }
.x-msg:hover { background: #00000005; }
.x-face { width: 40px; height: 40px; flex: none; margin-top: 2px; border-radius: 50%; background: var(--raised); box-shadow: inset 0 0 0 .5px var(--stroke); overflow: hidden; display: block; }
.x-mb { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.x-mh { display: flex; align-items: baseline; gap: 8px; }
.x-name { font-size: 15px; font-weight: 800; white-space: nowrap; }
.x-tag { align-self: center; height: 15px; padding: 0 4px; border-radius: 4px; background: var(--raised); font: 800 9.5px/15px var(--sans); color: var(--ink3); }
.x-tag.is-lead { background: var(--blue); color: #FEF1D0; }
.x-mh time { font: 650 11.5px system-ui, -apple-system, sans-serif; color: var(--ink3); }
.x-mb p { font-size: 14.5px; line-height: 20px; font-weight: 550; color: #2A292C; }
.x-mb p + p { margin-top: 6px; }
.x-feed code { font: 400 12.5px var(--mono); color: var(--ink); background: var(--raised); padding: 1px 5px; border-radius: 4px; }
.x-hand { display: flex; align-items: center; gap: 8px; margin: 10px 18px 0 72px; font-size: 12.5px; font-weight: 700; color: var(--ink3); animation: d-in .28s var(--ease); }
.x-hand b { color: var(--ink); font-weight: 800; }
.x-hand .ic { width: 13px; height: 13px; flex: none; }
.x-typing { display: flex; align-items: center; gap: 8px; margin: 12px 18px 0; font-size: 12.5px; font-weight: 700; color: var(--ink3); }
.x-typing img { width: 20px; height: 20px; border-radius: 50%; }
.x-typing b { color: var(--ink); font-weight: 800; }

/* o bloco de trabalho (work::run_block) */
.x-run { position: relative; max-width: 560px; margin-top: 8px; display: flex; flex-direction: column; border-radius: 12px; background: var(--recess); border: 1px solid var(--line); overflow: hidden; }
.x-run::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--line2); z-index: 1; }
.x-run.is-live::before { background: var(--ok); }
.x-run-h { min-height: 46px; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 18px; border: 0; background: none; text-align: left; cursor: pointer; }
.x-run-h > .x-mark, .x-run-h > .x-ld { flex: none; }
.x-run-h .x-mark { width: 16px; height: 16px; }
.x-run-h b { font-size: 13px; font-weight: 800; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-run-h time { font: 500 10.5px system-ui, -apple-system, sans-serif; color: var(--ink3); }
.x-pm { position: relative; width: 26px; height: 26px; flex: none; border-radius: 8px; }
.x-run-h:hover .x-pm { background: var(--hover); }
.x-pm::before, .x-pm::after { content: ''; position: absolute; left: 50%; top: 50%; translate: -50% -50%; background: var(--ink2); }
.x-pm::before { width: 10px; height: 2px; }
.x-pm.is-plus::after { width: 2px; height: 10px; }
.x-run ol { list-style: none; margin: 0; padding: 0 8px 6px; display: flex; flex-direction: column; gap: 2px; }
.x-run li { min-height: 28px; display: flex; align-items: center; gap: 9px; padding: 0 6px; border-radius: 8px; }
.x-run li.is-now { background: #2F9D6224; }
.x-si { width: 14px; height: 14px; flex: none; display: grid; place-items: center; }
.x-si .x-mark { width: 14px; height: 14px; }
.x-run li b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; font-size: 13px; font-weight: 800; color: var(--ink2); white-space: nowrap; }
.x-run li.is-now b { color: var(--ink); }
.x-run li.is-bad b { color: var(--bad); }
.x-run li code { min-width: 0; flex: 0 1 auto; padding: 0; background: none; font-size: 11.5px; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.x-run li time { flex: none; font: 700 11.5px system-ui, -apple-system, sans-serif; color: var(--ink3); }
.x-run li.is-now time { color: var(--ok-ink); }
.x-run-f { display: flex; align-items: center; gap: 12px; padding: 10px 14px 10px 18px; border-top: 1px solid #DEDDD9b3; font: 700 11.5px system-ui, -apple-system, sans-serif; color: var(--ink3); }
.x-run-f > span:last-child { margin-left: auto; }
.x-bar { display: flex; gap: 4px; }
.x-bar i { width: 19px; height: 6px; background: repeating-linear-gradient(90deg, var(--stroke) 0 4px, transparent 4px 5px); }
.x-bar i.on { background: repeating-linear-gradient(90deg, var(--ok) 0 4px, transparent 4px 5px); }
.x-bar i.now { background: repeating-linear-gradient(90deg, var(--pink) 0 4px, transparent 4px 5px); }

/* o campo (composer.rs) */
.x-dock { flex: none; padding: 4px 16px 14px; display: flex; flex-direction: column; }
.x-chips { padding: 0 2px 8px; }
.x-chips[hidden] { display: none; }
.x-chips button { height: 30px; padding: 0 11px; border-radius: 10px; font: 750 12.5px var(--sans) !important; color: var(--pink-ink) !important; }
.x-comp { display: flex; align-items: flex-end; gap: 4px; padding: 4px 8px; border-radius: 14px; background: var(--surface); border: 1px solid #0000000f; box-shadow: 0 1px 2px #29222c0a; }
.x-comp:focus-within { border-color: var(--line2); }
.x-field { display: contents; }
.x-plus { width: 30px; height: 30px; flex: none; margin: 4px 2px; border: 0; padding: 0; border-radius: 50%; background: var(--ink3); color: var(--surface) !important; display: grid; place-items: center; cursor: pointer; }
.x-plus:hover { background: var(--ink); }
.x-plus .ic { width: 14px; height: 14px; }
.x-comp textarea { flex: 1; min-width: 120px; min-height: 38px; padding: 9px 0 9px 4px; border: 0; outline: 0; resize: none; background: transparent; font: 650 14px/20px var(--sans); color: var(--ink); user-select: text; -webkit-user-select: text; }
.x-comp textarea::placeholder { color: var(--ink3); }
.x-model { height: 28px; flex-shrink: 1; min-width: 0; margin-bottom: 5px; display: inline-flex; align-items: center; gap: 6px; padding: 0 10px; border: 0; border-radius: 9px; background: var(--raised); color: var(--ink) !important; font: 800 12px var(--sans) !important; cursor: pointer; white-space: nowrap; overflow: hidden; }
.x-model:hover { background: #EAEAE7; }
.x-model .ic { width: 12px; height: 12px; flex: none; }
.x-model span { overflow: hidden; text-overflow: ellipsis; }
.x-mic { margin-bottom: 4px; }
.x-send { width: 34px; height: 34px; flex: none; margin: 2px; border: 0; padding: 0; border-radius: 50%; background: var(--raised); color: var(--ink3) !important; display: grid; place-items: center; cursor: pointer; transition: background .15s; }
.x-send .ic { width: 15px; height: 15px; }
.x-comp.is-ready .x-send { background: var(--pink); color: #fff !important; box-shadow: 0 4px 4.5px #fc3b7f99; }
.x-send.is-stop { background: var(--ink); border: 0; box-shadow: none; }
.x-send.is-stop::after { content: ""; width: 10px; height: 10px; border-radius: 2px; background: #fff; }

.m-tabs, .m-wsmenu { display: none; }

@media (max-width: 1100px) {
  .x-tail { display: none; }
}
@media (max-width: 1020px) {
  .chx { grid-template-columns: 72px 232px minmax(0, 1fr); }
  .d-face::before { left: -16px; }
  .x-mode.is-on::before { left: -19px; }
  .x-msg { padding-right: 24px; }
  .x-week { display: none; }
}

/* ---------- celular: o app do iPhone ---------- */
@media (max-width: 720px) {
  .chx { display: block; background: var(--chat); }
  .x-rail, .x-ban, .x-owner { display: none; }
  .x-list { position: absolute; inset: 0; border: 0; background: var(--chat); }
  .x-lsc { border: 0; padding: 14px 16px 86px; }
  .x-main { position: absolute; inset: 0; background: var(--chat); translate: 100% 0; visibility: hidden; transition: translate .3s var(--ease), visibility 0s .3s; padding-bottom: 66px; }
  .chx.is-conv .x-main { translate: 0 0; visibility: visible; transition: translate .3s var(--ease); }
  .chx.is-conv .x-list { visibility: hidden; transition: visibility 0s .3s; }

  .m-top { display: flex; align-items: center; gap: 8px; }
  .m-ws { position: relative; width: 34px; height: 34px; border: 0; padding: 0; border-radius: 10px; background: var(--c); color: #fff !important; font: 800 15px var(--sans) !important; display: grid; place-items: center; cursor: pointer; overflow: hidden; }
  .m-ws img { width: 100%; height: 100%; object-fit: cover; background: #fff; }
  .m-rb { width: 40px; height: 40px; border: 1px solid var(--line); padding: 0; border-radius: 50%; background: var(--surface); color: var(--ink) !important; display: grid; place-items: center; cursor: pointer; box-shadow: 0 2px 8px #29222c0f; }
  .m-rb .ic { width: 18px; height: 18px; }
  .m-sec h3 { margin: 0; }
  .m-title { margin-top: 14px; font: 400 34px/1.1 var(--pixel); letter-spacing: -.02em; }
  .m-status { margin-top: 8px; display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 750; color: var(--ink2); }
  .m-sec { margin-top: 28px; display: flex; flex-direction: column; gap: 10px; }
  .m-sec h3 { font-size: 19px; font-weight: 800; }
  .m-sec h3 span { margin-left: 4px; font: 650 13px system-ui, -apple-system, sans-serif; color: var(--ink3); }
  .m-chan { display: flex; flex-direction: column; gap: 12px; padding: 18px; border: 1px solid var(--stroke); border-radius: 26px; background: var(--surface) radial-gradient(circle, #00000012 1px, transparent 1.2px) 0 0 / 14px 14px; text-align: left; cursor: pointer; }
  .m-chan-h { display: flex; align-items: flex-start; gap: 8px; }
  .m-chan-h > span:first-child { flex: 1; min-width: 0; }
  .m-chan-h b { display: block; font-size: 18px; font-weight: 800; }
  .m-chan-h small { font: 500 12px system-ui, -apple-system, sans-serif; color: var(--ink3); }
  .m-go { width: 32px; height: 32px; flex: none; border-radius: 50%; background: var(--raised); display: grid; place-items: center; color: var(--ink2); }
  .m-go .ic { width: 14px; height: 14px; rotate: -45deg; }
  .m-chan-p { font-size: 14px; font-weight: 550; color: var(--ink2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .m-chan-f { display: flex; align-items: center; gap: 8px; }
  .m-stack { display: flex; }
  .m-stack img { width: 28px; height: 28px; border-radius: 50%; background: var(--raised); box-shadow: 0 0 0 2px var(--surface); }
  .m-stack img + img { margin-left: -8px; }
  .m-chan-f small { font-size: 12px; font-weight: 650; color: var(--ink3); }
  .m-chan-f em { font-style: normal; font-size: 12px; font-weight: 750; color: var(--ok-ink); }
  .m-group { border: 1px solid var(--stroke); border-radius: 22px; background: var(--surface); overflow: hidden; }
  .m-row { position: relative; width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 0; background: none; text-align: left; cursor: pointer; }
  .m-row + .m-row::before { content: ''; position: absolute; left: 62px; right: 0; top: 0; height: 1px; background: var(--stroke); }
  .m-row > .ic { width: 13px; height: 13px; flex: none; color: var(--ink3); }
  .m-row .x-rf { width: 36px; height: 36px; }
  .m-row .x-rf .x-pr { width: 15px; height: 15px; }
  .m-row .x-rf .x-pr::before { width: 10px; height: 10px; }
  .m-ic { width: 36px; height: 36px; flex: none; border-radius: 12px; background: var(--raised); display: grid; place-items: center; color: var(--ink2); }
  .m-ic .ic { width: 16px; height: 16px; }
  .m-rt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
  .m-rt b { font-size: 15px; font-weight: 800; }
  .m-rt small { font-size: 12.5px; font-weight: 600; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .m-rt small.is-work { color: var(--ok-ink); font-weight: 750; }
  .m-wsmenu { display: flex; flex-direction: column; position: absolute; left: 12px; top: 56px; z-index: 8; min-width: 200px; padding: 6px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); box-shadow: 0 16px 40px #29222c2e; }
  .m-wsmenu button { display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: none; font: 750 14.5px var(--sans) !important; cursor: pointer; text-align: left; }
  .m-wsmenu button:hover, .m-wsmenu button[aria-current="true"] { background: var(--raised); }
  .m-wsf { width: 28px; height: 28px; border-radius: 8px; background: var(--c); color: #fff; display: grid; place-items: center; font-weight: 800; overflow: hidden; }
  .m-wsf img { width: 100%; height: 100%; object-fit: cover; background: #fff; }

  /* a conversa empilhada, como a do iPhone */
  .x-head { height: 62px; padding: 0 12px; gap: 10px; border: 0; background: var(--chat); }
  .x-back { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border: 1px solid var(--line); padding: 0; border-radius: 50%; background: var(--surface); color: var(--ink) !important; cursor: pointer; box-shadow: 0 2px 8px #29222c0f; }
  .x-back .ic { width: 18px; height: 18px; }
  .x-hface { width: 30px; height: 30px; }
  .x-hn { flex: 1 1 auto; max-width: none; }
  .x-hn strong { font-size: 16px; }
  .x-hn small { display: block; font-size: 12px; font-weight: 650; color: var(--ink3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .x-hn small.is-work { color: var(--ok-ink); }
  .x-vr, .x-topic, .x-week, .x-conn, .x-cap, .x-tail, .x-keys > .x-key[aria-label="Trocar a foto"] { display: none; }
  .x-keys { flex: none; gap: 2px; padding: 2px 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); box-shadow: 0 2px 8px #29222c0f; }
  .x-keys .x-key { width: 38px; height: 38px; border-radius: 50%; }
  .x-keys .x-key .ic { width: 17px; height: 17px; }
  .x-branch { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: none; justify-content: center; color: var(--ink2) !important; }
  .x-branch span { display: none; }
  .x-branch .ic { width: 17px; height: 17px; }
  .x-feed.d-feed { padding: 4px 0 12px; }
  .x-msg { padding: 3px 16px 3px 14px; gap: 12px; margin-top: 16px; }
  .x-face { width: 36px; height: 36px; }
  .x-mb p { font-size: 16px; line-height: 23px; color: var(--ink); }
  .x-name { font-size: 16px; }
  .x-hand { margin-left: 62px; }
  .x-run { max-width: none; border-radius: 16px; }
  .x-dock { padding: 4px 12px 10px; }
  .x-comp { align-items: center; gap: 8px; padding: 0; border: 0; background: none; box-shadow: none; }
  .x-plus { width: 44px; height: 44px; margin: 0; border: 1px solid var(--line); background: var(--surface); color: var(--ink) !important; box-shadow: 0 2px 8px #29222c0f; }
  .x-plus:hover { background: var(--raised); }
  .x-plus .ic { width: 18px; height: 18px; }
  .x-field { flex: 1; min-width: 0; display: flex; align-items: center; min-height: 44px; padding: 0 4px 0 14px; border: 1px solid var(--line); border-radius: 22px; background: var(--surface); box-shadow: 0 2px 8px #29222c0f; }
  .x-comp textarea { min-width: 0; font-size: 16px; padding: 11px 0; }
  .x-model { display: none; }
  .x-mic { margin: 0; }
  .x-send { width: 44px; height: 44px; margin: 0; border: 1px solid var(--line); background: var(--surface); }

  .m-tabs { display: flex; position: absolute; left: 50%; bottom: 10px; translate: -50% 0; z-index: 6; width: min(360px, calc(100% - 24px)); padding: 4px; gap: 2px; border: 1px solid var(--line); border-radius: 999px; background: #ffffffe8; backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 8px 24px #29222c1f; }
  .m-tabs button { flex: 1; height: 50px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; border: 0; padding: 0; border-radius: 999px; background: none; font: 700 11px var(--sans) !important; color: var(--ink) !important; cursor: pointer; }
  .m-tabs button.is-on { background: var(--raised); }
  .m-tabs img, .m-tabs .ic { width: 22px; height: 22px; }
}
@media (prefers-reduced-motion: reduce) {
  .x-ld i, .x-pr.is-work::after { animation: none; }
  .x-ld i:nth-child(1) { background: var(--pink); opacity: 1; }
}
