/* ==========================================================================
   IRCC CONTACT MANAGEMENT — MOBILE
   Mobile-only list, filter sheet, full-screen drawer and shell integration.
   Activated by contacts-mobile.js at the 384px-class mobile profile.
   ========================================================================== */

/* 01 — MOBILE WORKSPACE */
.contacts-module #ctDrawer .ct-mobile-accordion-section > .ct-form-section-head {
  position: relative;
  align-items: center;
  min-height: 50px;
  margin: 0;
  padding: 0 34px 0 0;
  cursor: pointer;
  user-select: none;
}

.contacts-module #ctDrawer .ct-mobile-accordion-section > .ct-form-section-head::after {
  content: "›";
  position: absolute;
  right: 6px;
  top: 50%;
  color: #8b90a2;
  font-size: 24px;
  line-height: 1;
  font-weight: 400;
  transform: translateY(-50%) rotate(0deg);
  transition: transform .16s ease,color .16s ease;
}

.contacts-module #ctDrawer .ct-mobile-accordion-section > .ct-form-section-head:hover::after { color: #6549dc; }

.contacts-module #ctDrawer .ct-mobile-accordion-section.ct-mobile-section-open > .ct-form-section-head::after { transform: translateY(-50%) rotate(90deg); }

.contacts-module #ctDrawer .ct-mobile-accordion-section.ct-mobile-section-open > .ct-form-section-head { margin-bottom: 14px; }

.contacts-module #ctDrawer .ct-mobile-accordion-section > .ct-form-section-head:focus-visible { outline: 2px solid rgba(101,73,220,.28); outline-offset: 4px; border-radius: 8px; }

.contacts-module .ctm-contact-avatar {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-radius: 50%;
  background: linear-gradient(145deg,#eee9ff 0%,#f8f6ff 100%);
  color: #6548df;
  box-shadow: inset 0 0 0 1px rgba(105,75,226,.10);
}

.ctm-shell, .ctm-filter-layer, .ct-mobile-head-actions, .ct-mobile-workspace-tabs, .ct-mobile-more-toggle, .contacts-module #ctDrawer .ct-mobile-accordion-section:not(.ct-mobile-section-open) > *:not(.ct-form-section-head), .contacts-module .ctm-contact-avatar.image-failed .ct-profile-avatar-image { display: none; }

.contacts-module.ct-mobile-b-ready .ctm-card-head { grid-template-columns: var(--ct-size-mobile-card-avatar) minmax(0,1fr) auto; align-items: center; gap: 9px; }

.contacts-module.ct-mobile-b-ready .ctm-contact-avatar {
  width: var(--ct-size-mobile-card-avatar);
  height: var(--ct-size-mobile-card-avatar);
  display: grid;
  place-items: center;
  flex: 0 0 var(--ct-size-mobile-card-avatar);
  font-size: 10px;
  font-weight: 850;
}

.contacts-module.ct-mobile-b-ready .ctm-card-copy { min-width: 0; }

.contacts-module.ct-mobile-b-ready .ctm-card-head strong, .contacts-module.ct-mobile-b-ready .ctm-card-subtitle { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.contacts-module.ct-mobile-b-ready .ctm-channel.linkedin { color: #0A66C2; }

.contacts-module.ct-mobile-b-ready .ctm-channel.linkedin .ctm-channel-label { background: #0A66C2; color: #fff; font-weight: 850; }


/* 02 — MOTION */
@keyframes ctmShimmer{to {background-position:-200% 0}}

/* 03 — RESPONSIVE PROFILES */

@media (max-width: 980px) {
  body.ctm-filter-open, body.ctm-drawer-open { overflow: hidden !important; overscroll-behavior: none; touch-action: none; }
  .ctm-add svg { width: 16px; height: 16px; stroke-width: 2.1; }
  .ctm-search { position: relative; display: block; }
  .ctm-search input::placeholder { color: #75798a; }
  .ctm-search input:focus { border-color: #c7c3d1; box-shadow: 0 0 0 3px rgba(121,112,163,.08); }
  .ctm-search-clear.show { display: grid; }
  .ctm-search-clear svg { width: 16px; height: 16px; }
  .ctm-filter-btn svg { width: 16px; height: 16px; display: none; }
  .ctm-filter-btn b[hidden], .ctm-active-chips[hidden], .ctm-clear-all[hidden], .ctm-source-tabs[hidden] { display: none !important; }
  .contacts-module.ct-mobile-b-ready .ct-page-head, .contacts-module.ct-mobile-b-ready .ct-dimension-bar, .contacts-module.ct-mobile-b-ready .ct-coverage-card, .contacts-module.ct-mobile-b-ready .ct-filter-card, .contacts-module.ct-mobile-b-ready .ct-table-card, .ctm-active-chips::-webkit-scrollbar, .ctm-channel-stack::-webkit-scrollbar { display: none; }
  .ctm-channel-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .ctm-loading-card {
    padding: 18px;
    border: 1px solid var(--ctm-line);
    border-radius: 16px;
    background: #fff;
    display: grid;
    gap: 10px;
  }
  .ctm-loading-card span {
    display: block;
    height: 11px;
    border-radius: 999px;
    background: linear-gradient(90deg,#f4f2f7,#ece8f1,#f4f2f7);
    background-size: 200% 100%;
    animation: ctmShimmer 1.2s infinite;
  }
  .ctm-loading-card span:nth-child(1) { width: 62%; }
  .ctm-loading-card span:nth-child(2) { width: 82%; }
  .ctm-loading-card span:nth-child(3) { width: 45%; }
  .ctm-empty {
    padding: 18px;
    border: 1px solid var(--ctm-line);
    border-radius: 16px;
    background: #fff;
    text-align: center;
  }
  .ctm-empty strong { display: block; color: #242632; font-size: 15px; font-weight: 800; }
  .ctm-empty p { margin: 7px 0 0; color: #828592; font-size: 12px; line-height: 1.45; }
  .ctm-pagination button:disabled { opacity: .45; }
  .ctm-pagination button.is-next:disabled { opacity: .4; }
  .ctm-filter-layer {
    position: fixed;
    inset: 0;
    z-index: 1820;
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
  }
  .ctm-filter-layer.show { opacity: 1; visibility: visible; pointer-events: auto; }
  .ctm-sheet-handle {
    width: 36px;
    height: 4px;
    flex: 0 0 4px;
    margin: 10px auto 2px;
    border-radius: 999px;
    background: #ddd8e1;
  }
  .ctm-filter-title { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
  .ctm-filter-head-actions { display: flex; align-items: center; gap: 12px; }
  .contacts-module.ct-mobile-b-ready .ct-drawer-backdrop { z-index: 1850; background: rgba(31,27,45,.34); backdrop-filter: blur(2px); }
  .contacts-module.ct-mobile-b-ready .ct-drawer {
    top: auto;
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-width: none;
    max-height: 92dvh;
    border-radius: 24px;
    box-shadow: 0 -24px 58px rgba(28,23,52,.2);
    transform: translateY(calc(100% + 18px));
    transition: transform .23s cubic-bezier(.2,.8,.2,1);
  }
  .ctm-filter-layer.show .ctm-filter-sheet, .contacts-module.ct-mobile-b-ready .ct-drawer.show { transform: translateY(0); }
  .contacts-module.ct-mobile-b-ready .ct-drawer-head { position: relative; align-items: flex-start; padding: 22px 14px 12px; }
  .contacts-module.ct-mobile-b-ready .ct-drawer-head::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 50%;
    width: 42px;
    height: 4px;
    border-radius: 999px;
    background: #d9d6df;
    transform: translateX(-50%);
  }
  .contacts-module.ct-mobile-b-ready .ct-avatar {
    width: var(--ct-size-mobile-drawer-avatar);
    height: var(--ct-size-mobile-drawer-avatar);
    flex-basis: var(--ct-size-mobile-drawer-avatar);
    border-radius: 12px;
    font-size: var(--ct-overlay-subtitle-size);
  }
  .contacts-module.ct-mobile-b-ready .ct-drawer-title h2 { font-size: var(--ct-overlay-title-size); line-height: var(--ct-line-height-1-15); font-weight: var(--ct-overlay-title-weight); }
  .contacts-module.ct-mobile-b-ready .ct-drawer-title p { max-width: 240px; font-size: var(--ct-overlay-subtitle-size); line-height: var(--ct-line-height-1-3); font-weight: var(--ct-overlay-meta-weight); }
  .contacts-module.ct-mobile-b-ready .ct-drawer-close { width: 36px; height: 36px; border: 0; background: #f6f5f9; }
  .contacts-module.ct-mobile-b-ready .ct-drawer-body { padding: 12px 14px 16px !important; }
  .contacts-module.ct-mobile-b-ready .ct-quick-actions { gap: 7px; margin-bottom: 10px; }
  .contacts-module.ct-mobile-b-ready .ct-quick-action { height: 42px; border-radius: 11px; font-size: var(--ct-overlay-button-size); font-weight: var(--ct-overlay-button-weight); }
  .contacts-module.ct-mobile-b-ready .ct-form { gap: 10px; }
  .contacts-module.ct-mobile-b-ready .ct-form-section { padding: 12px; border-radius: 13px; }
  .contacts-module.ct-mobile-b-ready .ct-form-section-head { margin-bottom: 10px; }
  .contacts-module.ct-mobile-b-ready .ct-field-grid { grid-template-columns: 1fr; gap: 9px; }
  .contacts-module.ct-mobile-b-ready .ct-field-wide { grid-column: auto; }
  .contacts-module.ct-mobile-b-ready .ct-drawer-kicker { font-size: var(--ct-overlay-meta-size); font-weight: var(--ct-overlay-eyebrow-weight); }
  .contacts-module.ct-mobile-b-ready .ct-field > span { font-size: var(--ct-overlay-meta-size); font-weight: var(--ct-overlay-label-weight); }
  .contacts-module.ct-mobile-b-ready .ct-field input, .contacts-module.ct-mobile-b-ready .ct-field select { height: 43px; font-size: var(--ct-overlay-control-size); font-weight: var(--ct-overlay-body-weight); }
  .contacts-module.ct-mobile-b-ready .ct-visibility-options { grid-template-columns: 1fr; }
  .contacts-module.ct-mobile-b-ready .ct-drawer-footer {
    position: sticky;
    bottom: 0;
    min-height: 62px;
    padding: 9px 12px max(9px,env(safe-area-inset-bottom));
    background: #fff;
  }
  .contacts-module.ct-mobile-b-ready .ct-drawer-footer-right { width: 100%; }
  .contacts-module.ct-mobile-b-ready .ct-primary-btn, .contacts-module.ct-mobile-b-ready .ct-secondary-btn { height: 44px; flex: 1; font-size: var(--ct-overlay-button-size); font-weight: var(--ct-overlay-button-weight); }
  .contacts-module.ct-mobile-b-ready .ct-danger-btn { width: 100%; height: 42px; font-size: var(--ct-overlay-button-size); font-weight: var(--ct-overlay-button-weight); }
  .contacts-module.ct-mobile-b-ready .ct-toast {
    left: 12px;
    right: 12px;
    bottom: 14px;
    max-width: none;
    font-size: 11px;
  }
  .contacts-module.ct-mobile-b-ready {
    width: 100%;
    min-width: 0;
    padding: 0;
    overflow: visible;
    --ctm-bg: #f4f3f8;
    --ctm-panel: #ffffff;
    --ctm-line: #e7e5ed;
    --ctm-line-2: #ded9e6;
    --ctm-text: #2d3043;
    --ctm-muted: #818596;
    --ctm-soft: #8b8f9f;
    --ctm-purple: #6b4cf2;
    --ctm-purple-2: #8c70f6;
    --ctm-purple-soft: #f1edff;
    --ctm-pill: #dfe8ff;
    --ctm-radius: 16px;
  }
  .contacts-module.ct-mobile-b-ready .ctm-shell { display: block; padding: 8px 8px 18px; }
  .ctm-panel {
    padding: 2px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  .ctm-topmeta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    margin: 0 2px 7px;
  }
  .ctm-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    letter-spacing: -.01em;
    min-height: 23px;
    padding: 0 8px;
    background: var(--ctm-purple-soft);
    color: #6850d8;
    font-size: 9px;
    font-weight: 800;
  }
  .ctm-total-top { white-space: nowrap; color: #7c8091; font-size: 9.5px; font-weight: 750; }
  .ctm-title-row {
    display: grid;
    grid-template-columns: minmax(0,1fr) auto;
    align-items: center;
    gap: 8px;
    margin: 0 2px;
  }
  .ctm-title-copy h1 {
    margin: 0;
    color: #14161f;
    font-size: 19px;
    line-height: 1.06;
    font-weight: 850;
    letter-spacing: -.45px;
  }
  .ctm-title-copy p {
    margin: 8px 0 0;
    color: var(--ctm-muted);
    margin-top: 4px;
    font-size: 10.5px;
    line-height: 1.3;
    font-weight: 600;
  }
  .ctm-add {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    min-width: 65px;
    height: 34px;
    gap: 4px;
    padding: 0 11px;
    border-radius: 11px;
    background: linear-gradient(135deg,#6748ef,#866af6);
    color: #fff;
    font-size: var(--ct-overlay-meta-size);
    font-weight: var(--ct-overlay-label-weight);
    box-shadow: 0 5px 14px rgba(108,76,245,.16);
  }
  .ctm-search-row {
    display: grid;
    align-items: center;
    grid-template-columns: minmax(0,1fr) 86px;
    gap: 7px;
    margin-top: 10px;
  }
  .ctm-search > svg {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #75798a;
    pointer-events: none;
    left: 11px;
    width: 15px;
    height: 15px;
  }
  .ctm-search input {
    width: 100%;
    border: 1px solid #bdb9c4;
    background: #fff;
    color: #262834;
    outline: 0;
    height: 40px;
    padding: 0 34px 0 34px;
    border-color: #dedce6;
    border-radius: 11px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(46,39,79,.025);
  }
  .ctm-search-clear {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: none;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #7a7d8c;
    right: 5px;
    width: 28px;
    height: 28px;
  }
  .ctm-filter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    min-width: 86px;
    height: 40px;
    gap: 5px;
    padding: 0 9px;
    border: 1px solid #ded7ff;
    border-radius: 11px;
    background: #f1edff;
    color: #6048d8;
    font-size: var(--ct-overlay-meta-size);
    font-weight: var(--ct-overlay-label-weight);
  }
  .ctm-filter-btn b {
    display: inline-grid;
    place-items: center;
    border-radius: 999px;
    font-weight: 800;
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    background: #6b4cf2;
    color: #fff;
    font-size: 8px;
  }
  .ctm-active-row {
    display: flex;
    align-items: center;
    margin-top: 12px;
    gap: 6px;
    margin: 7px 2px 0;
  }
  .ctm-active-chips {
    display: flex;
    min-width: 0;
    flex: 1 1 auto;
    overflow: auto;
    scrollbar-width: none;
    gap: 5px;
  }
  .ctm-chip {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    border: 1px solid #cfe0ff;
    border-radius: 999px;
    white-space: nowrap;
    min-height: 23px;
    gap: 4px;
    padding: 0 7px 0 8px;
    border-color: #ddd5ff;
    background: #f3efff;
    color: #654bd5;
    font-size: 8.5px;
    font-weight: 800;
  }
  .ctm-chip svg { width: 10px; height: 10px; }
  .ctm-clear-all {
    flex: 0 0 auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #858899;
    font-size: 9px;
    font-weight: 750;
  }
  .ctm-source-tabs {
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 2px;
    margin-top: 8px;
    padding: 3px;
    border: 1px solid #e2dfea;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(39,33,78,.02);
  }
  .ctm-source-tabs button {
    min-width: 0;
    padding: 0 8px;
    border: 0;
    background: transparent;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 29px;
    border-radius: 8px;
    color: #767a8d;
    font-size: 9.5px;
    font-weight: 750;
  }
  .ctm-source-tabs button.active { font-weight: 700; background: #f1edff; color: #6248dc; box-shadow: inset 0 0 0 1px #ded7ff; }
  .ctm-card-list { display: grid; gap: 7px; margin-top: 8px; }
  .ctm-contact-card {
    overflow: hidden;
    position: relative;
    border: 1px solid #e4e3ea;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 3px 10px rgba(42,36,72,.025);
  }
  .ctm-card-main {
    width: 100%;
    border: 0;
    background: transparent;
    text-align: left;
    color: inherit;
    min-height: 76px;
    padding: 9px 36px 9px 11px;
  }
  .ctm-card-head { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 7px; }
  .ctm-card-head strong {
    display: block;
    color: #1d2029;
    font-size: 12.5px;
    line-height: 1.15;
    font-weight: 820;
  }
  .ctm-side-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid #d8e5ff;
    border-radius: 999px;
    white-space: nowrap;
    min-height: 20px;
    padding: 0 7px;
    border-color: #ded7ff;
    background: #f1edff;
    color: #6048d8;
    font-size: 7.8px;
    font-weight: 800;
  }
  .ctm-side-pill.sell { border-color: #e0dfe5; background: #f6f6f9; color: #747789; }
  .ctm-card-subtitle {
    margin-top: 3px;
    overflow: hidden;
    color: #717587;
    font-size: 9.5px;
    line-height: 1.25;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .ctm-card-tags {
    display: flex;
    flex-wrap: nowrap;
    gap: 4px;
    margin-top: 6px;
    padding-right: 2px;
    overflow: hidden;
  }
  .ctm-card-tags span {
    display: inline-flex;
    align-items: center;
    flex: 0 1 auto;
    max-width: 112px;
    min-height: 19px;
    padding: 0 6px;
    overflow: hidden;
    border: 0;
    border-radius: 6px;
    background: #f5f4f9;
    color: #6e7182;
    font-size: 7.5px;
    font-weight: 750;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  .ctm-card-footer {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    position: absolute;
    right: 6px;
    bottom: 6px;
    padding: 0;
  }
  .ctm-toggle {
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    color: #868999;
  }
  .ctm-toggle svg { width: 15px; height: 15px; stroke-width: 2; }
  .ctm-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 39px;
    padding: 5px 7px 5px 9px;
    border-top: 1px solid #f0eef4;
    background: #fbfaff;
  }
  .ctm-channel-stack {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    overflow: auto;
    scrollbar-width: none;
    gap: 5px;
  }
  .ctm-channel {
    flex: 0 0 auto;
    min-width: 0;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    border: 1px solid #d2d0d7;
    border-radius: 999px;
    color: #1f2230;
    text-decoration: none;
    min-height: 28px;
    gap: 5px;
    padding: 0 7px;
    border-color: #e3e0e9;
    background: #fff;
    font-size: 9px;
    font-weight: 700;
  }
  .ctm-channel-label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    min-width: 24px;
    height: 18px;
    padding: 0 5px;
    background: #f0ecff;
    color: #6048d8;
    font-size: 7.5px;
    font-weight: 800;
  }
  .ctm-channel.mail .ctm-channel-label { background: #f3f2f6; color: #777a89; }
  .ctm-paginationbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 12px;
    border-top: 1px solid #ece9ef;
    margin-top: 9px;
    padding: 9px 2px 0;
  }
  .ctm-paginationbar > span { color: #818596; font-size: 9px; font-weight: 700; }
  .ctm-pagination { display: flex; align-items: center; gap: 5px; }
  .ctm-pagination button {
    border: 1px solid #d7d3dd;
    background: #fff;
    color: #7d7f8b;
    min-width: 46px;
    height: 30px;
    padding: 0 10px;
    border-radius: 9px;
    font-size: 9px;
    font-weight: 750;
  }
  .ctm-pagination button.is-next { border-color: #6c4cf5; background: #6c4cf5; color: #fff; }
  .ctm-filter-backdrop {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: rgba(32,28,48,.30);
    backdrop-filter: blur(2px);
  }
  .ctm-choice-row button.active {
    border-color: #dbd3ff;
    background: #f1edff;
    color: #6249d9;
    font-weight: 800;
    box-shadow: inset 0 0 0 1px #e8e2ff;
  }
  .contacts-module.ct-mobile-b-ready .ct-field textarea { font-size: var(--ct-overlay-body-size); font-weight: var(--ct-overlay-body-weight); }
  .ctm-filter-sheet {
    position: absolute;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
    transform: translateY(calc(100% + 16px));
    transition: transform .22s cubic-bezier(.2,.8,.2,1);
    left: 7px;
    right: 7px;
    bottom: 7px;
    border: 1px solid #e1dfe8;
    border-radius: 20px;
    box-shadow: 0 -20px 52px rgba(31,25,58,.18);
    max-height: 92dvh;
  }
  .ctm-filter-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid #ece8ef;
    border-bottom-color: #efedf3;
    padding: 11px 14px 12px;
  }
  .ctm-filter-title h2 {
    margin: 0;
    color: #2d3043;
    font-size: var(--ct-overlay-title-size);
    line-height: 1.1;
    font-weight: var(--ct-overlay-title-weight);
  }
  .ctm-filter-title span { color: #8a8e9f; font-size: var(--ct-overlay-meta-size); line-height: var(--ct-line-height-1-2); font-weight: var(--ct-overlay-meta-weight); }
  .ctm-reset-link {
    padding: 0;
    border: 0;
    background: transparent;
    color: #6d52dc;
    font-size: var(--ct-overlay-meta-size);
    font-weight: var(--ct-overlay-label-weight);
  }
  .ctm-sheet-close {
    display: grid;
    place-items: center;
    padding: 0;
    border: 0;
    background: transparent;
    border-radius: 8px;
    color: #757889;
    width: 30px;
    height: 30px;
  }
  .ctm-sheet-close svg { width: 17px; height: 17px; }
  .ctm-filter-body { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 13px 14px 16px !important; }
  .ctm-filter-section + .ctm-filter-section { margin-top: 16px; }
  .ctm-filter-section-head { margin-bottom: 8px; }
  .ctm-filter-section-head strong { color: #55596c; font-size: var(--ct-overlay-section-title-size); line-height: var(--ct-line-height-1-2); font-weight: var(--ct-overlay-section-title-weight); }
  .ctm-choice-row { display: flex; flex-wrap: wrap; gap: 7px; }
  .ctm-choice-row button {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    border: 1px solid #e1dfe7;
    background: #fff;
    color: #737789;
    min-height: 32px;
    padding: 0 11px;
    border-radius: 9px;
    font-size: var(--ct-overlay-meta-size);
    line-height: var(--ct-line-height-1-15);
    font-weight: var(--ct-overlay-label-weight);
  }
  .ctm-select select {
    width: 100%;
    border: 1px solid #d9d6dd;
    background: #fff;
    outline: 0;
    border-color: #e0dee7;
    color: #55586a;
    height: 41px;
    padding: 0 11px;
    border-radius: 10px;
    font-size: var(--ct-overlay-subtitle-size);
    font-weight: var(--ct-overlay-label-weight);
  }
  .ctm-filter-footer {
    display: grid;
    border-top: 1px solid #ece8ef;
    background: #fff;
    border-top-color: #efedf3;
    grid-template-columns: 88px minmax(0,1fr);
    gap: 8px;
    padding: 9px 12px max(10px,env(safe-area-inset-bottom));
  }
  .ctm-reset-btn {
    border: 1px solid #ccc8d2;
    background: #fff;
    border-color: #e0dde7;
    color: #7b7e8f;
    height: 40px;
    border-radius: 10px;
    font-size: var(--ct-overlay-button-size);
    font-weight: var(--ct-overlay-button-weight);
  }
  .ctm-done-btn {
    border: 0;
    background: linear-gradient(135deg,#6748ef,#8165f5);
    color: #fff;
    box-shadow: 0 5px 14px rgba(108,76,245,.14);
    height: 40px;
    border-radius: 10px;
    font-size: var(--ct-overlay-button-size);
    font-weight: var(--ct-overlay-button-weight);
  }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawerBackdrop.show, body:has(#contactsApp.ct-mobile-b-ready) #ctDrawerBackdrop[aria-hidden="false"] {
    position: fixed !important;
    inset: 0;
    z-index: 2850;
    display: block !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    background: rgba(31,27,45,.34) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
  }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer.show, body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer[aria-hidden="false"] {
    position: fixed !important;
    top: auto !important;
    left: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
    width: auto !important;
    min-width: 0;
    max-width: none !important;
    height: min(88dvh,720px);
    max-height: calc(100dvh - 16px);
    display: flex !important;
    flex-direction: column;
    overflow: hidden !important;
    margin: 0 !important;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    border: 1px solid #e2deea;
    border-radius: 24px !important;
    background: #fff !important;
    box-shadow: 0 -24px 58px rgba(28,23,52,.22) !important;
    transform: none;
    translate: none;
    scale: 1;
    z-index: 2860;
  }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer[aria-hidden="false"] .ct-drawer-body { flex: 1 1 auto; min-height: 0; overflow: auto !important; -webkit-overflow-scrolling: touch; }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-avatar { width: var(--ct-size-mobile-drawer-avatar) !important; height: var(--ct-size-mobile-drawer-avatar); flex: 0 0 var(--ct-size-mobile-drawer-avatar); border-radius: 50% !important; }
}

@media (max-width: 640px) {
  #contactsApp.ct-mobile-b-ready .ctm-quick-group { display: grid; gap: 5px; }
  #contactsApp.ct-mobile-b-ready .ctm-total-top { color: #767d92; font-size: 12px; font-weight: 800; letter-spacing: -.01em; }
  #contactsApp.ct-mobile-b-ready .ctm-quick-pill.active { border-color: #d9d0ff; background: #f2edff; color: #674de3; box-shadow: inset 0 0 0 1px #e7deff; }
  #contactsApp.ct-mobile-b-ready .ctm-active-row { margin-top: 10px; }
  #contactsApp.ct-mobile-b-ready .ctm-quick-top { gap: 8px; display: block; margin-top: 10px; margin-bottom: 8px; }
  #contactsApp.ct-mobile-b-ready .ctm-quick-capsule {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    overflow: visible;
    padding-bottom: 0;
  }
  #contactsApp.ct-mobile-b-ready .ctm-quick-track {
    border: 1px solid #e5e0f7;
    background: #fff;
    min-width: 0;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 10px;
    border-radius: 28px;
    box-shadow: 0 1px 0 rgba(31,33,48,.02), 0 4px 14px rgba(52,46,88,.04);
  }
  #contactsApp.ct-mobile-b-ready .ctm-quick-group-track {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
  }
  #contactsApp.ct-mobile-b-ready .ctm-quick-divider {
    flex: 0 0 auto;
    width: 100%;
    height: 1px;
    background: #e7e2f1;
    margin: 0;
  }
  #contactsApp.ct-mobile-b-ready .ctm-quick-pill {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    color: #687089;
    white-space: nowrap;
    box-shadow: none;
    width: 100%;
    min-width: 0;
    min-height: 40px;
    gap: 6px;
    padding: 0 10px;
    font-size: 11px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -.01em;
  }
  #contactsApp.ct-mobile-b-ready .ctm-quick-pill svg { flex: 0 0 auto; width: 15px; height: 15px; stroke-width: 1.9; }
  #contactsApp.ct-mobile-b-ready .ctm-quick-pill span {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  #contactsApp.ct-mobile-b-ready .ctm-quick-group-track:nth-of-type(2) .ctm-quick-pill { font-size: 10px; padding: 0 8px; }
  #contactsApp.ct-mobile-b-ready .ctm-badge {
    min-height: auto;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: #8575e6;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 10.5px;
    line-height: 1.1;
    letter-spacing: .14em;
    gap: 8px;
  }
  #contactsApp.ct-mobile-b-ready .ctm-badge::before {
    content: "";
    border-radius: 50%;
    background: #6c4cf5;
    flex: 0 0 auto;
    width: 7px;
    height: 7px;
    box-shadow: 0 0 0 4px rgba(108,76,245,.08);
  }
  #contactsApp.ct-mobile-b-ready .ctm-title-copy h1 span { color: #6c4cf5; }
  #contactsApp.ct-mobile-b-ready .ctm-title-copy p {
    margin-top: 8px;
    color: #7f8599;
    font-size: 12px;
    line-height: 1.45;
    font-weight: 600;
    max-width: none;
    display: none;
  }
  .ctm-filter-section-head { display: flex; align-items: center; gap: 7px; }
  .ctm-filter-section-icon {
    width: 21px;
    height: 21px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 21px;
    border-radius: 7px;
    background: #f2efff;
    color: #6a50df;
  }
  .ctm-filter-section-icon svg { width: 12px; height: 12px; stroke-width: 1.9; }
  .ctm-choice-row button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
  .ctm-choice-row button svg {
    width: 13px;
    height: 13px;
    flex: 0 0 13px;
    stroke-width: 1.9;
    color: #7d8193;
  }
  .ctm-choice-row button.active svg { color: #684ce4; }
  .ctm-filter-section:has(.ctm-filter-section-head strong) .ctm-choice-row button { max-width: 100%; }
  .ctm-select-icon { position: relative; display: block; }
  .ctm-select-icon > svg {
    position: absolute;
    left: 11px;
    top: 50%;
    width: 14px;
    height: 14px;
    transform: translateY(-50%);
    color: #7160ce;
    stroke-width: 1.9;
    z-index: 2;
    pointer-events: none;
  }
  .ctm-select-icon select { padding-left: 34px; }
  .ctm-filter-sheet .ctm-filter-section[data-filter-label="Market side"] { margin-top: 0; margin-bottom: 12px; }
  .ctm-filter-sheet .ctm-filter-section:first-child, .ctm-filter-sheet .ctm-filter-section:nth-child(2), .ctm-filter-sheet .ctm-filter-section[data-filter-label="Institution category"] { margin-top: 0; }
  #contactsApp.ct-mobile-b-ready .ctm-topmeta { align-items: center; margin-bottom: 1px; }
  #contactsApp.ct-mobile-b-ready .ctm-title-row { align-items: center; gap: 0; margin-bottom: 8px; }
  #contactsApp.ct-mobile-b-ready .ctm-title-copy h1 { font-weight: 900; font-size: 23px; line-height: 1.03; letter-spacing: -.04em; }
  #contactsApp.ct-mobile-b-ready .ctm-search-row {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0,1fr) 44px 44px;
    gap: 10px;
    align-items: center;
    margin-top: 8px;
    padding-right: 0;
  }
  #contactsApp.ct-mobile-b-ready .ctm-search > svg {
    left: 15px;
    top: 50%;
    width: 18px;
    height: 18px;
    transform: translateY(-50%);
  }
  #contactsApp.ct-mobile-b-ready .ctm-search input {
    height: 44px;
    border-radius: 14px;
    font-size: 11px;
    line-height: 44px;
    padding: 0 38px 0 44px;
  }
  #contactsApp.ct-mobile-b-ready .ctm-search-clear { right: 6px; width: 28px; height: 28px; }
  #contactsApp.ct-mobile-b-ready .ctm-filter-btn {
    font-weight: 800;
    min-width: 44px;
    height: 44px;
    gap: 0;
    padding: 0;
    border-radius: 14px;
    font-size: 12px;
    margin-right: 2px;
    width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
  }
  #contactsApp.ct-mobile-b-ready .ctm-add {
    height: 44px;
    min-width: 44px;
    gap: 0;
    padding: 0;
    font-size: 12px;
    font-weight: 800;
    border-radius: 14px;
    width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 0;
  }
  #contactsApp.ct-mobile-b-ready .ctm-filter-btn svg {
    display: block;
    stroke-width: 2.05;
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
  }
  #contactsApp.ct-mobile-b-ready .ctm-add svg {
    display: block;
    width: 18px;
    height: 18px;
    stroke-width: 2.05;
    flex: 0 0 auto;
  }
  .contacts-module.ct-mobile-b-ready .ct-drawer { z-index: 1860; }
  .contacts-module.ct-mobile-b-ready .ct-drawer-backdrop.show + .ct-drawer, .contacts-module.ct-mobile-b-ready .ct-drawer.show {
    position: fixed;
    top: auto;
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    height: min(88dvh,720px);
    max-height: calc(100dvh - 16px);
    display: flex;
    flex-direction: column;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: none;
    z-index: 1860;
  }
  .contacts-module.ct-mobile-b-ready .ct-drawer-backdrop, .contacts-module.ct-mobile-b-ready .ct-drawer-backdrop.show { z-index: 1850; }
  body:has(#contactsApp.ct-mobile-b-ready) > .app-shell, body:has(#contactsApp.ct-mobile-b-ready) > .app-shell > .main, body:has(#contactsApp.ct-mobile-b-ready) > .app-shell > .main > .content {
    transform: none;
    filter: none;
    -webkit-filter: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    perspective: none;
    contain: none;
    will-change: auto;
  }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer.show, body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer[aria-hidden="false"] {
    z-index: 2860;
    position: fixed !important;
    inset: 0;
    top: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    min-width: 0;
    max-width: none !important;
    height: 100dvh;
    max-height: none;
    margin: 0 !important;
    border: 0;
    border-radius: 0 !important;
    background: #fff !important;
    box-shadow: none !important;
    transform: none;
    overflow: hidden !important;
  }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawerBackdrop.show, body:has(#contactsApp.ct-mobile-b-ready) #ctDrawerBackdrop[aria-hidden="false"] {
    position: fixed !important;
    inset: 0;
    z-index: 2850;
    background: rgba(26,24,37,.22) !important;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-drawer-title {
    grid-column: 1;
    grid-row: 1;
    display: flex !important;
    align-items: center;
    gap: 10px;
    min-width: 0;
  }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-avatar {
    width: var(--ct-size-mobile-drawer-avatar) !important;
    height: var(--ct-size-mobile-drawer-avatar);
    flex: 0 0 var(--ct-size-mobile-drawer-avatar);
    border: 1px solid #ddd4ff;
    border-radius: 13px !important;
    background: #f5f1ff !important;
    color: #6248df;
    font-size: var(--ct-overlay-section-title-size);
    font-weight: var(--ct-overlay-section-title-weight);
  }
  .ctm-choice-row button span, #contactsApp.ct-mobile-b-ready .ctm-search, body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-drawer-title-copy { min-width: 0; }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-drawer-name-row {
    display: flex !important;
    align-items: center;
    gap: 8px;
    min-width: 0;
    margin-top: 0;
  }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-drawer-name-row h2, body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-drawer-title h2 {
    display: block !important;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100% !important;
    margin: 0 !important;
    overflow: hidden !important;
    color: #25293a;
    font-size: var(--ct-overlay-title-size);
    line-height: var(--ct-line-height-1-12);
    font-weight: var(--ct-overlay-title-weight);
    letter-spacing: -.025em;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-drawer-inline-badge {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    height: 20px;
    padding: 0 8px !important;
    border: 1px solid #e1dbfb;
    border-radius: 999px !important;
    background: #f6f2ff !important;
    color: #715ad8;
    font-size: var(--ct-overlay-chip-size);
    line-height: var(--ct-line-height-1);
    font-weight: var(--ct-overlay-chip-weight);
    letter-spacing: .7px;
    text-transform: uppercase;
    white-space: nowrap;
  }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-drawer-title p {
    display: block !important;
    max-width: 100% !important;
    margin: 4px 0 0 !important;
    overflow: hidden !important;
    color: #7d8294;
    font-size: var(--ct-overlay-meta-size);
    line-height: var(--ct-line-height-1-25);
    font-weight: var(--ct-overlay-meta-weight);
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-drawer-sector-summary {
    display: block !important;
    margin: 4px 0 0 !important;
    overflow: hidden !important;
    color: #697083;
    font-size: var(--ct-overlay-meta-size);
    line-height: var(--ct-line-height-1-3);
    font-weight: var(--ct-overlay-label-weight);
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-drawer-close {
    grid-column: 2;
    grid-row: 1;
    width: 38px !important;
    height: 38px;
    align-self: start;
    justify-self: end;
    padding: 0 !important;
    border: 0;
    border-radius: 12px !important;
    background: #f5f5f8 !important;
    color: #6f7485;
  }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-drawer-close svg { width: 18px !important; height: 18px; }
  .ct-mobile-head-actions {
    grid-column: 1/-1;
    grid-row: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 0;
  }
  .ct-mobile-side-badge {
    min-width: 0;
    height: 28px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 9px;
    border-radius: 999px;
    background: #f2f2f6;
    color: #696f80;
    font-size: var(--ct-overlay-meta-size);
    line-height: var(--ct-line-height-1);
    font-weight: var(--ct-overlay-label-weight);
    white-space: nowrap;
  }
  .ct-mobile-side-badge.buy { background: #eaf8f3; color: #16745f; }
  .ct-mobile-side-badge.sell { background: #edf3ff; color: #4565bc; }
  .ct-mobile-head-action-buttons { display: flex; align-items: center; gap: 6px; margin-left: auto; }
  .ct-mobile-head-action {
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 10px;
    border: 1px solid #ded8f8;
    border-radius: 10px;
    background: #faf9ff;
    color: #6149d8;
    font-size: var(--ct-overlay-meta-size);
    line-height: var(--ct-line-height-1);
    font-weight: var(--ct-overlay-label-weight);
    white-space: nowrap;
  }
  .ct-mobile-head-action.primary { border-color: #6b4df1; background: #6b4df1; color: #fff; }
  .ct-mobile-head-action:disabled { opacity: .42; cursor: not-allowed; }
  .ct-mobile-workspace-tabs {
    flex: 0 0 42px;
    display: grid;
    grid-template-columns: repeat(3,minmax(0,1fr));
    gap: 4px;
    padding: 4px 10px;
    border-top: 1px solid #f0eef5;
    border-bottom: 1px solid #e9e7ef;
    background: #fff;
  }
  .ct-mobile-workspace-tabs button {
    min-width: 0;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 7px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #777c8e;
    font-size: var(--ct-overlay-meta-size);
    font-weight: var(--ct-overlay-label-weight);
    white-space: nowrap;
  }
  .ct-mobile-workspace-tabs button.active { background: #f1edff; color: #6249dc; font-weight: var(--ct-overlay-section-title-weight); }
  .ct-mobile-workspace-tabs button:disabled { opacity: .35; }
  #ctDrawer[data-mobile-tab="profile"] #ctContactForm { display: flex; }
  #ctDrawer[data-mobile-tab="relationship"] #ctRelationshipPanel:not(.hidden), #ctDrawer[data-mobile-tab="activity"] #ctRelationshipPanel:not(.hidden) { display: block; }
  #ctDrawer .ct-form { gap: 0; }
  #ctDrawer .ct-form-section {
    margin: 0;
    padding: 11px 0;
    border: 0;
    border-bottom: 1px solid #ecebf1;
    border-radius: 0;
    background: #fff;
    box-shadow: none;
  }
  #ctDrawer .ct-form-section:first-child { padding-top: 3px; }
  #ctDrawer .ct-form-section:last-child { border-bottom: 0; }
  #ctDrawer .ct-form-section-head {
    position: relative;
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 34px;
    margin: 0 0 9px;
    padding: 0;
  }
  #ctDrawer .ct-form-icon { width: 31px; height: 31px; flex: 0 0 31px; border-radius: 9px; }
  #contactsApp.ct-mobile-b-ready .ctm-quick-group-track:nth-of-type(2) .ctm-quick-pill svg, .ct-mobile-head-action svg, #ctDrawer .ct-form-icon svg { width: 14px; height: 14px; }
  #ctDrawer .ct-form-section-head strong { color: #2e3244; font-size: var(--ct-overlay-section-title-size); line-height: var(--ct-line-height-1-2); font-weight: var(--ct-overlay-section-title-weight); }
  #ctDrawer .ct-mobile-accordion-section > .ct-form-section-head { min-height: 44px; margin: 0; padding-right: 26px; cursor: pointer; }
  #ctDrawer .ct-mobile-accordion-section > .ct-form-section-head::after {
    content: "›";
    position: absolute;
    right: 4px;
    top: 50%;
    color: #8c90a0;
    font-size: 22px;
    line-height: 1;
    transform: translateY(-50%) rotate(0deg);
    transition: transform .16s ease;
  }
  #ctDrawer .ct-mobile-accordion-section.ct-mobile-section-open > .ct-form-section-head::after { transform: translateY(-50%) rotate(90deg); }
  #ctDrawer .ct-mobile-accordion-section.ct-mobile-section-open > .ct-form-section-head { margin-bottom: 9px; }
  #ctDrawer .ct-field-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px 8px; }
  #ctDrawer .ct-section-profile .ct-field-grid { grid-template-columns: 1fr; }
  #ctDrawer .ct-field-wide { grid-column: 1/-1; }
  #ctDrawer .ct-field { gap: 4px; }
  #ctDrawer .ct-field > span {
    color: #666c7f;
    font-size: var(--ct-overlay-meta-size);
    line-height: var(--ct-line-height-1-2);
    font-weight: var(--ct-overlay-label-weight);
    text-transform: none;
    letter-spacing: 0;
  }
  #ctDrawer .ct-field input, #ctDrawer .ct-field select {
    height: 46px;
    padding: 0 11px;
    border-radius: 11px;
    font-size: var(--ct-overlay-control-size);
    line-height: var(--ct-line-height-1-2);
    font-weight: var(--ct-overlay-body-weight);
  }
  #ctDrawer .ct-field textarea {
    min-height: 68px;
    padding: 9px 10px;
    border-radius: 11px;
    font-size: var(--ct-overlay-body-size);
    line-height: var(--ct-line-height-1-4);
  }
  #ctDrawer .ct-field small { font-size: var(--ct-overlay-helper-size); line-height: var(--ct-line-height-1-35); font-weight: var(--ct-overlay-helper-weight); }
  .ct-mobile-more-toggle {
    width: max-content;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 8px 0 0;
    padding: 0 9px;
    border: 1px solid #e1dcf8;
    border-radius: 9px;
    background: #faf9ff;
    color: #6650ce;
    font-size: var(--ct-overlay-meta-size);
    font-weight: var(--ct-overlay-label-weight);
  }
  .ct-mobile-side-badge svg, .ct-mobile-workspace-tabs button svg, .ct-mobile-more-toggle svg { width: 13px; height: 13px; }
  #ctDrawer .ct-visibility-options { grid-template-columns: 1fr 1fr; gap: 7px; }
  #ctDrawer .ct-visibility-options label>span { min-height: 56px; padding: 8px 9px; }
  #ctDrawer .ct-visibility-options strong { font-size: var(--ct-overlay-meta-size); font-weight: var(--ct-overlay-label-weight); }
  #ctDrawer .ct-visibility-options small { font-size: var(--ct-overlay-helper-size); line-height: var(--ct-line-height-1-3); font-weight: var(--ct-overlay-helper-weight); }
  #ctDrawer .ct-contact-access-summary { margin-bottom: 8px; }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-drawer-footer-right {
    flex: 1 1 auto;
    width: auto !important;
    display: grid !important;
    grid-template-columns: minmax(0,.75fr) minmax(0,1.25fr);
    gap: 7px;
    margin: 0 !important;
  }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-primary-btn, body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-secondary-btn {
    width: 100% !important;
    height: 44px;
    padding: 0 10px !important;
    border-radius: 11px !important;
    font-size: var(--ct-overlay-button-size);
    font-weight: var(--ct-overlay-button-weight);
  }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-danger-btn:not(.hidden) {
    width: 44px !important;
    min-width: 44px;
    height: 44px;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    flex: 0 0 44px;
    padding: 0 !important;
    overflow: hidden !important;
    border-radius: 12px !important;
    font-size: 0;
    line-height: 0;
  }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-danger-btn svg {
    display: block !important;
    width: 17px !important;
    height: 17px;
    margin: 0 !important;
    flex: 0 0 auto;
  }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-drawer-head {
    position: relative !important;
    flex: 0 0 auto;
    display: grid !important;
    grid-template-columns: minmax(0,1fr) 38px;
    grid-template-rows: auto auto;
    align-items: start;
    gap: 7px 10px;
    min-height: 0;
    padding: max(10px,env(safe-area-inset-top)) 14px 9px !important;
    border-bottom: 0;
    background: #fff !important;
    order: 1;
  }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-mobile-workspace-tabs { order: 2; }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-drawer-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    padding: 9px 12px 12px !important;
    background: #fff !important;
    order: 3;
  }
  body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-drawer-footer {
    position: relative !important;
    flex: 0 0 auto;
    min-height: 58px;
    display: flex !important;
    flex-direction: row;
    align-items: center;
    gap: 7px;
    padding: 7px 10px max(7px,env(safe-area-inset-bottom)) !important;
    border-top: 1px solid #e9e7ee;
    background: #fff !important;
    box-shadow: 0 -5px 14px rgba(34,30,54,.04) !important;
    order: 4;
  }
  #contactsApp.ct-mobile-b-ready .ctm-quick-top[hidden], body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-drawer-head::before, body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer .ct-drawer-kicker, body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer #ctQuickActions, body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer[data-mobile-tab="relationship"] .ct-drawer-footer, body:has(#contactsApp.ct-mobile-b-ready) #ctDrawer[data-mobile-tab="activity"] .ct-drawer-footer { display: none !important; }
  .ct-email-compose-backdrop { padding: 0; background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .ct-email-compose-modal {
    width: 100vw;
    max-width: none;
    height: 100dvh;
    max-height: none;
    margin: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    transform: none;
  }
  .ct-email-compose-backdrop.show .ct-email-compose-modal { transform: none; }
  .contacts-module.ct-mobile-b-ready .ct-smart-native-shell, #contactsApp.ct-mobile-b-ready .ctm-quick-capsule::-webkit-scrollbar, #contactsApp.ct-mobile-b-ready .ctm-filter-btn span, #contactsApp.ct-mobile-b-ready .ctm-add span, #contactsApp.ct-mobile-b-ready .ctm-filter-btn b, #ctDrawer[data-mobile-tab="profile"] #ctRelationshipPanel, #ctDrawer[data-mobile-tab="relationship"] #ctContactForm, #ctDrawer[data-mobile-tab="activity"] #ctContactForm, #ctDrawer .ct-form-section-head span:not(.ct-form-icon), #ctDrawer .ct-mobile-accordion-section:not(.ct-mobile-section-open) > *:not(.ct-form-section-head), #ctDrawer .ct-section-profile:not(.ct-mobile-more-open) .ct-mobile-optional-field, #ctDrawer[data-mobile-tab="relationship"] .ct-drawer-footer, #ctDrawer[data-mobile-tab="activity"] .ct-drawer-footer, #ctDrawer[data-mobile-tab="relationship"] #ctRelationshipPanel .ct-rel-utility-row, #ctDrawer[data-mobile-tab="relationship"] #ctRelationshipPanel .ct-rel-privacy, #ctDrawer[data-mobile-tab="relationship"] #ctRelationshipPanel .ct-rel-history-head, #ctDrawer[data-mobile-tab="relationship"] #ctRelationshipPanel .ct-rel-history, #ctDrawer[data-mobile-tab="activity"] #ctRelationshipPanel .ct-rel-utility-row, #ctDrawer[data-mobile-tab="activity"] #ctRelationshipPanel .ct-rel-privacy, #ctDrawer[data-mobile-tab="activity"] #ctRelationshipPanel .ct-rel-snapshot, #ctDrawer[data-mobile-tab="activity"] #ctRelationshipPanel .ct-rel-editor, #ctDrawer:not([data-mobile-tab]) .ct-mobile-workspace-tabs, .ct-email-compose-head { display: none; }
  .ct-email-compose-body { flex: 1 1 auto; min-height: 0; height: 100dvh; background: #fff !important; }
  .ct-email-compose-body iframe { width: 100% !important; height: 100%; background: #fff !important; }
  .ct-email-compose-loading { background: #fff; }
  body.ct-email-compose-open #ctEmailComposeBackdrop, body.ct-email-compose-open .ct-email-compose-backdrop, #ctEmailComposeBackdrop.show {
    position: fixed !important;
    inset: 0;
    z-index: 4200;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  #ctEmailComposeBackdrop.show .ct-email-compose-modal { position: relative; z-index: 1; }
  :root { --app-gap: 0px; --app-radius: 0px; }
  .app-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-radius: 0 !important;
  }
  .main {
    background: #fff !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-radius: 0 !important;
  }
  .page-content {
    background: #fff !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-radius: 0 !important;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 0;
    padding-bottom: 0;
  }
  .main-content, .app-main {
    background: #fff !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-radius: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
  }
  .dashboard-page {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-radius: 0 !important;
    padding-top: 0;
    padding-bottom: 0;
  }
  html, body, html:has(#contactsApp.ct-mobile-b-ready), body:has(#contactsApp.ct-mobile-b-ready) { margin: 0 !important; padding: 0 !important; width: 100% !important; max-width: 100% !important; }
  body:has(#contactsApp.ct-mobile-b-ready) *:has(#contactsApp.ct-mobile-b-ready) {
    box-sizing: border-box;
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
  }
  #contactsApp.ct-mobile-b-ready {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    border-radius: 0;
    box-shadow: none;
  }
  #contactsApp.ct-mobile-b-ready .ctm-shell {
    position: static;
    left: auto;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow: visible;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    border-radius: 0;
    box-shadow: none;
  }
  #contactsApp.ct-mobile-b-ready .ctm-panel {
    box-sizing: border-box;
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding: 10px 10px 18px;
    border-radius: 0;
    box-shadow: none;
  }
  #contactsApp.ct-mobile-b-ready .ctm-card-list { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; }
}
