@media (max-width: 767px), (pointer: coarse) and (max-device-width: 767px), (pointer: coarse) and (max-device-height: 767px) {
  .nx-share-backdrop {
    position: fixed; inset: 0; z-index: 30010;
    background: #04101d66; -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
    animation: nx-share-fade 160ms ease-out both;
  }
  .nx-share-layer {
    position: fixed; z-index: 30011;
    top: var(--nexti-app-viewport-top, 0px); left: var(--nexti-app-viewport-left, 0px);
    width: var(--nexti-app-viewport-width, 100vw); height: var(--nexti-app-viewport-height, 100dvh);
    display: flex; align-items: flex-end; justify-content: center;
    padding: max(12px, var(--nexti-app-safe-top, env(safe-area-inset-top, 0px))) max(0px, var(--nexti-app-safe-right, 0px)) 0 max(0px, var(--nexti-app-safe-left, 0px));
    box-sizing: border-box; pointer-events: none;
  }
  .nx-share {
    --share-surface: var(--mobile-theme-surface, #101e30);
    --share-fill: var(--mobile-theme-surface-alt, #17293c);
    --share-ink: var(--mobile-theme-text, #eaf2fb);
    --share-muted: var(--mobile-theme-component-muted, var(--mobile-theme-muted, #9aacc2));
    --share-line: var(--mobile-theme-line, #294056);
    --share-accent: var(--mobile-theme-component-accent, var(--mobile-theme-accent, #04d2df));
    --share-control: var(--mobile-theme-control, #04d2df);
    --share-on-control: var(--mobile-theme-on-control, #04181f);
    pointer-events: auto; box-sizing: border-box; color: var(--share-ink); background: var(--share-surface);
    width: 100%; height: min(700px, 100%); max-height: 100%; min-height: 0;
    display: flex; flex-direction: column; overflow: hidden;
    border: 1px solid var(--share-line); border-bottom: 0; border-radius: 28px 28px 0 0;
    padding: 0 0 max(10px, var(--nexti-app-safe-bottom, env(safe-area-inset-bottom, 0px)));
    box-shadow: 0 -12px 60px #03102026; outline: none;
    animation: nx-share-rise 220ms cubic-bezier(.2,.8,.2,1) both;
    font-family: inherit; -webkit-tap-highlight-color: transparent;
  }
  .nx-share *, .nx-share *::before, .nx-share *::after { box-sizing: border-box; }
  .nx-share button, .nx-share input, .nx-share textarea { font: inherit; }
  .nx-share button { cursor: pointer; -webkit-appearance: none; appearance: none; }
  .nx-share svg { display: block; width: 22px; height: 22px; flex: 0 0 auto; }
  .nx-share button:focus-visible, .nx-share input:focus-visible, .nx-share textarea:focus-visible { outline: 2px solid var(--share-accent); outline-offset: 2px; }
  .nx-share-head { display: flex; align-items: center; flex: 0 0 auto; gap: 12px; padding: 20px 16px 14px 20px; }
  .nx-share-head__mark { display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px; border-radius: 16px; background: color-mix(in srgb, var(--share-accent) 12%, var(--share-surface)); color: var(--share-accent); }
  .nx-share-head__copy { flex: 1; min-width: 0; }
  .nx-share-head h2 { margin: 0; color: var(--share-ink); font-size: 21px; font-weight: 750; line-height: 1.25; letter-spacing: -.4px; }
  .nx-share-head p { margin: 4px 0 0; color: var(--share-muted); font-size: 12px; line-height: 1.4; }
  .nx-share-icon-button { display: grid; place-items: center; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%; color: var(--share-muted); background: transparent; }
  .nx-share-head > .nx-share-icon-button { background: var(--share-fill); }
  .nx-share-search { display: flex; align-items: center; gap: 10px; margin: 0 20px; padding: 0 12px; min-height: 46px; flex: 0 0 auto; background: var(--share-fill); color: var(--share-muted); border: 1px solid transparent; border-radius: 16px; }
  .nx-share-search:focus-within { border-color: var(--share-accent); }
  .nx-share-search > svg { width: 19px; height: 19px; }
  .nx-share-search input { width: 100%; min-width: 0; height: 44px; padding: 0; border: 0; outline: none !important; color: var(--share-ink); background: transparent; font-size: 16px; }
  .nx-share-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
  .nx-share-search input::placeholder, .nx-share-compose textarea::placeholder { color: var(--share-muted); opacity: 1; }
  .nx-share-search .nx-share-icon-button { flex-basis: 32px; width: 32px; height: 40px; margin-right: -8px; }
  .nx-share-search .nx-share-icon-button svg { width: 18px; height: 18px; }
  .nx-share-filters { display: flex; gap: 6px; flex: 0 0 auto; padding: 12px 20px 10px; overflow-x: auto; scrollbar-width: none; }
  .nx-share-filters::-webkit-scrollbar { display: none; }
  .nx-share-filters button { flex: 0 0 auto; min-height: 36px; padding: 8px 13px; border: 0; border-radius: 999px; background: transparent; color: var(--share-muted); font-size: 13px; font-weight: 650; white-space: nowrap; transition: background 140ms ease, color 140ms ease; }
  .nx-share-filters button.is-active { background: color-mix(in srgb, var(--share-accent) 12%, var(--share-surface)); color: var(--share-accent); }
  .nx-share-list { flex: 1 1 0; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 0 10px 8px; scroll-padding-block: 6px; }
  .nx-share-recipient { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 72px; padding: 11px 10px; border: 0; border-radius: 18px; background: transparent; color: var(--share-ink); text-align: left; transition: background 140ms ease; }
  .nx-share-recipient.is-selected { background: color-mix(in srgb, var(--share-accent) 10%, var(--share-surface)); }
  .nx-share-recipient:active { background: var(--share-fill); }
  .nx-share-avatar { position: relative; display: grid; place-items: center; flex: 0 0 46px; width: 46px; height: 46px; border-radius: 50%; overflow: hidden; font-size: 17px; font-weight: 750; color: #172332; }
  .nx-share-avatar--0 { background: linear-gradient(135deg,#8ee3e1,#6fb5e9); }
  .nx-share-avatar--1 { background: linear-gradient(135deg,#d7b8ff,#b09bea); }
  .nx-share-avatar--2 { background: linear-gradient(135deg,#ffd796,#ffb172); }
  .nx-share-avatar--3 { background: linear-gradient(135deg,#f9c2d9,#eaa0c1); }
  .nx-share-avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
  .nx-share-recipient__copy { display: flex; flex-direction: column; flex: 1 1 0; gap: 5px; min-width: 0; }
  .nx-share-recipient__name { font-size: 15px; font-weight: 650; line-height: 1.3; color: var(--share-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nx-share-recipient__meta { color: var(--share-muted); font-size: 12px; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nx-share-check { display: grid; place-items: center; width: 23px; height: 23px; flex: 0 0 23px; border: 1.5px solid var(--share-line); border-radius: 50%; }
  .nx-share-check.is-selected { border-color: var(--share-control); background: var(--share-control); color: var(--share-on-control); }
  .nx-share-check svg { width: 17px; height: 17px; stroke-width: 2.4; }
  .nx-share-empty { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 9px; min-height: 150px; height: 100%; padding: 20px; text-align: center; color: var(--share-muted); }
  .nx-share-empty > svg { width: 30px; height: 30px; margin-bottom: 5px; color: var(--share-accent); }
  .nx-share-empty strong { color: var(--share-ink); font-size: 15px; }
  .nx-share-empty span { font-size: 13px; line-height: 1.5; }
  .nx-share-footer { flex: 0 0 auto; padding: 12px 16px 0; border-top: 1px solid var(--share-line); background: var(--share-surface); }
  .nx-share-target { display: flex; align-items: center; gap: 8px; min-height: 30px; margin: -3px 0 8px; color: var(--share-accent); }
  .nx-share-target > svg { width: 16px; height: 16px; }
  .nx-share-target > span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; font-weight: 650; }
  .nx-share-target .nx-share-icon-button { width: 30px; height: 30px; flex-basis: 30px; }
  .nx-share-target .nx-share-icon-button svg { width: 16px; height: 16px; }
  .nx-share-compose { display: flex; gap: 10px; align-items: flex-end; }
  .nx-share-compose textarea { display: block; flex: 1 1 0; min-width: 0; width: 100%; min-height: 44px; max-height: 112px; resize: none; overflow-y: auto; border: 1px solid transparent; border-radius: 18px; padding: 12px 14px; background: var(--share-fill); color: var(--share-ink); font-size: 16px; line-height: 20px; }
  .nx-share-compose textarea:focus { border-color: var(--share-accent); outline: none; }
  .nx-share-send { display: grid; place-items: center; flex: 0 0 46px; width: 46px; height: 46px; padding: 0; border: 0; border-radius: 50%; background: var(--share-control); color: var(--share-on-control); transition: opacity 140ms ease, transform 140ms ease; }
  .nx-share-send:active:not(:disabled) { transform: scale(.94); }
  .nx-share-send:disabled { background: var(--share-fill); color: var(--share-muted); cursor: default; }
  .nx-share-send svg { width: 22px; height: 22px; }
  .nx-share-error { margin: 0 0 10px; padding: 9px 12px; border-radius: 12px; font-size: 13px; line-height: 1.45; background: color-mix(in srgb,#c52650 12%,var(--share-surface)); color: var(--mobile-theme-danger, #f390a6); }
  .nx-share-spinner { width: 19px; height: 19px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: nx-share-spin 700ms linear infinite; }

  /* Keep each count physically attached to its icon at every nav width. */
  html:root .tm-mobile-chats__tab-icon { position: relative; overflow: visible; }
  html:root .tm-mobile-chats__tab-icon > .tm-mobile-chats__tab-badge {
    position: absolute !important; top: -6px !important; left: calc(100% - 6px) !important; right: auto !important; bottom: auto !important;
    display: inline-flex; align-items: center; justify-content: center;
    box-sizing: border-box; min-width: 18px; height: 18px; padding: 0 4px;
    border: 2px solid var(--mobile-theme-surface, #101e30); border-radius: 999px;
    background: #ca2850 !important; color: #fff !important; box-shadow: none !important;
    font-size: 10px; font-weight: 750; line-height: 1; white-space: nowrap; pointer-events: none;
  }
  html:root .nc-avatar, html:root .nc-avatar > img { border-radius: 50% !important; }
  html:root .nc-avatar i { border-color: var(--mobile-theme-surface, #151e2b); }
}
@keyframes nx-share-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes nx-share-rise { from { opacity: .6; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }
@keyframes nx-share-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .nx-share, .nx-share-backdrop, .nx-share-spinner { animation: none !important; }
  .nx-share button { transition: none !important; }
}
