/* V1.4.0 mobile workspace. The same hosted UI runs in native containers and
   ordinary browsers. Desktop rules and campaign content styles remain intact. */
:root {
  --mobile-nav-height: 74px;
  --mobile-topbar-height: 68px;
}
#mobile-nav,
.mobile-app-mark,
.mobile-app-name,
.mobile-filter-heading,
.mobile-search-submit,
.mobile-shortcuts,
.mobile-record-actions,
.mobile-page-selection > span { display: none; }
.mobile-connection[hidden] { display: none; }
.mobile-connection {
  padding: 12px 16px;
  margin-bottom: 16px;
  border: 1px solid #dfca93;
  border-radius: 12px;
  color: #75531b;
  background: #fff7e6;
  font-size: 13px;
  line-height: 1.5;
}
.mobile-page-selection { display: inline-flex; align-items: center; }
.auth-brand img.auth-full-logo { width: 330px; max-width: 100%; height: auto; border-radius: 0; }

@media (max-width: 760px), (max-height: 500px) and (pointer: coarse) {
  html { scroll-padding-top: calc(var(--mobile-topbar-height) + env(safe-area-inset-top) + 12px); }
  body { background: #f2f6f7; -webkit-tap-highlight-color: transparent; }
  body.has-mobile-shell { padding-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom)); }
  #sidebar, .nav-overlay, .icon-btn.menu-toggle { display: none !important; }
  #app { margin-left: 0; min-width: 0; }
  .topbar {
    position: sticky;
    top: 0;
    z-index: 600;
    min-height: calc(var(--mobile-topbar-height) + env(safe-area-inset-top));
    height: auto;
    padding: calc(10px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 10px max(16px, env(safe-area-inset-left));
    gap: 12px;
    background: #ffffffed;
    border-bottom: 1px solid #dce7e9;
    backdrop-filter: blur(16px);
  }
  .topbar > .row { min-width: 0; gap: 11px; }
  .mobile-app-mark { display: flex; width: 42px; height: 42px; flex: 0 0 42px; border-radius: 12px; overflow: hidden; }
  .mobile-app-mark img { width: 100%; height: 100%; object-fit: contain; }
  .topbar-path { display: grid; gap: 3px; min-width: 0; font-size: 14px; line-height: 1.3; }
  .topbar-path .path-brand { display: block; font-size: 10px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: #5a7482; }
  .topbar-path .path-brand > .muted { display: none; }
  .topbar-path .desktop-app-name { display: none; }
  .topbar-path .mobile-app-name { display: inline; }
  .topbar-path > strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-date, .topbar-profile > span:first-child { display: none; }
  .topbar-tools { flex: 0 0 auto; }
  .topbar-profile { min-width: 44px; min-height: 44px; justify-content: center; }
  .topbar-profile .avatar { display: flex; width: 38px; height: 38px; font-size: 13px; border: 2px solid #fff; box-shadow: 0 0 0 1px #cee0e3; }
  .page { width: 100%; padding: 23px max(16px, env(safe-area-inset-right)) 28px max(16px, env(safe-area-inset-left)); }
  .page-head { flex-direction: column; gap: 17px; margin-bottom: 22px; align-items: stretch; }
  .page-head h1 { font-size: 28px; line-height: 1.15; letter-spacing: -.75px; overflow-wrap: anywhere; }
  .page-head .eyebrow { font-size: 10px; margin-bottom: 8px; letter-spacing: 1.4px; }
  .tagline { font-size: 13px; line-height: 1.65; margin-top: 10px; max-width: none; }
  body[data-mobile-route="dashboard"] .page-head .tagline { display: none; }
  .head-actions { display: flex; width: 100%; gap: 8px; flex-wrap: wrap; }
  .head-actions > .btn { flex: 1 1 auto; justify-content: center; white-space: normal; }
  .btn { min-height: 44px; padding: 11px 15px; border-radius: 11px; font-size: 13px; line-height: 1.35; }
  .btn.small { min-height: 42px; padding: 10px 13px; font-size: 12px; }
  .icon-btn { min-width: 44px; width: 44px; height: 44px; flex-shrink: 0; border-radius: 10px; }
  .btn:focus-visible, .icon-btn:focus-visible, #mobile-nav a:focus-visible, #mobile-nav button:focus-visible,
  .mobile-more-groups a:focus-visible, .mobile-more-groups button:focus-visible {
    outline: 3px solid #139c88; outline-offset: 3px;
  }
  .card, .stack, .grid-two > *, .grid-equal > *, #content { min-width: 0; }
  .card { border-radius: 17px; border-color: #dde7e9; box-shadow: 0 3px 14px #17394705; }
  .card-head { padding: 17px; gap: 12px; flex-wrap: wrap; }
  .card-head h2 { font-size: 17px; line-height: 1.3; }
  .card-head p { font-size: 11px; line-height: 1.6; }
  .card-pad { padding: 18px; }
  .help-text { font-size: 12px; line-height: 1.7; }
  .small { font-size: 12px; }
  .pill { font-size: 10px; line-height: 1.35; padding: 5px 8px; white-space: normal; }
  .notice { font-size: 12px; line-height: 1.65; padding: 14px; }
  .field { font-size: 12px; gap: 8px; }
  .field input, .field select, .field textarea,
  .auth-card form input, .campaign-field input, .campaign-field select, .campaign-field textarea,
  .ce-field input, .ce-field select, .ce-field textarea,
  .ce-property-section .ce-field input, .ce-property-section .ce-field select,
  .campaign-unsubscribe-search input, .ce-content-tools select {
    min-height: 46px; font-size: 16px;
  }
  .field small, .check-field small { font-size: 11px; line-height: 1.6; }
  .check-field { padding: 8px 0; gap: 11px; align-items: flex-start; font-size: 13px; }
  .check-field input, .table-check { width: 22px; height: 22px; flex-shrink: 0; }
  .form-grid, .form-grid.three { gap: 18px 13px; }
  .form-section summary { min-height: 48px; align-items: center; }

  /* A single app bar with clear active destinations and full account menus. */
  #mobile-nav {
    position: fixed;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    left: 0; right: 0; bottom: 0;
    z-index: 900;
    min-height: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom));
    padding: 8px max(9px, env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(9px, env(safe-area-inset-left));
    background: #fffffffa;
    border-top: 1px solid #dbe6e9;
    box-shadow: 0 -4px 22px #10334208;
    backdrop-filter: blur(16px);
  }
  .mobile-nav-item {
    border: 0; background: none; color: #667d8a;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 4px; min-height: 54px; padding: 0 2px;
    border-radius: 11px; font-family: inherit; cursor: pointer; text-decoration: none;
  }
  .mobile-nav-item > span { display: flex; align-items: center; justify-content: center; height: 30px; min-width: 50px; border-radius: 11px; }
  .mobile-nav-item .icon { width: 21px; height: 21px; }
  .mobile-nav-item > strong { font-size: 10px; font-weight: 650; line-height: 1.1; }
  .mobile-nav-item.active { color: #076f61; }
  .mobile-nav-item.active > span { background: #dff3ed; }
  .mobile-nav-item.active > strong { font-weight: 800; }
  #mobile-nav a:hover { text-decoration: none; }
  .mobile-keyboard-open #mobile-nav, .mobile-dialog-open #mobile-nav, .ce-editor-open #mobile-nav { display: none; }
  #toast { left: 16px; right: 16px; width: auto; bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 12px); z-index: 2500; }
  .toast-item { font-size: 13px; line-height: 1.5; max-width: none; width: 100%; }
  .ce-editor-open #toast, .mobile-dialog-open #toast { bottom: calc(12px + env(safe-area-inset-bottom)); }

  /* Search stays visible while the full filters expand on demand. */
  .mobile-filter-form { padding: 14px; border-radius: 16px; margin-bottom: 18px; }
  .mobile-filter-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .mobile-filter-heading > span { font-size: 12px; font-weight: 750; color: #486373; }
  .mobile-filter-heading .btn { min-height: 42px; padding: 8px 11px; gap: 6px; }
  .mobile-filter-heading .btn > .icon:last-child { width: 13px; height: 13px; transform: rotate(90deg); transition: transform .18s; }
  .mobile-filters-expanded .mobile-filter-heading .btn > .icon:last-child { transform: rotate(-90deg); }
  [data-filter-count] { color: #fff; background: #087967; min-width: 21px; height: 21px; padding: 2px 6px; border-radius: 7px; font-size: 10px; line-height: 17px; }
  [data-filter-count][hidden] { display: none; }
  .mobile-filter-form .filters-grid { display: grid; grid-template-columns: minmax(0, 1fr) 46px; gap: 13px 8px; }
  .mobile-filter-form .filters-grid > .field { grid-column: 1 / -1; }
  .mobile-filter-form .filters-grid > .mobile-filter-search { display: flex; grid-column: 1; min-width: 0; padding-top: 12px; }
  .mobile-filter-search > span { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
  .mobile-filter-search input { width: 100%; padding: 12px; background: #f8fbfc; border-radius: 11px; }
  .mobile-search-submit { display: flex; align-items: center; justify-content: center; align-self: end; grid-column: 2; min-height: 46px; border: 0; border-radius: 11px; color: #fff; background: #087b6b; }
  .mobile-filter-form:not(.mobile-filters-expanded) .filters-grid > .field:not(.mobile-filter-search),
  .mobile-filter-form:not(.mobile-filters-expanded) .filters-bottom { display: none; }
  .mobile-filters-expanded .filters-grid { padding-top: 12px; }
  .mobile-filters-expanded .filters-grid > .mobile-filter-search { padding-top: 0; }
  .mobile-filter-form .filters-bottom { margin-top: 17px; gap: 13px; padding-top: 16px; }
  .filter-actions { width: 100%; display: flex; gap: 8px; }
  .filter-actions > .btn { flex: 1; justify-content: center; }

  /* Dashboard: real metrics, reachable next steps, and touch-friendly tasks. */
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
  .stat { padding: 18px 15px 16px; border-radius: 17px; min-height: 154px; }
  .stat-label { font-size: 11px; max-width: calc(100% - 23px); line-height: 1.4; }
  .stat-symbol { top: 16px; right: 13px; width: 25px; height: 25px; }
  .stat-symbol .icon { width: 15px; height: 15px; }
  .stat-number { font-size: 34px; margin-top: 20px; line-height: 1; letter-spacing: -1px; }
  .stat-foot { font-size: 10px; line-height: 1.6; margin-top: 12px; }
  .mobile-shortcuts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
  .mobile-shortcuts > a { display: flex; align-items: center; gap: 10px; color: #1c3d4f; background: #fff; border: 1px solid #dfe8ea; border-radius: 15px; padding: 15px 12px; min-height: 75px; }
  .mobile-shortcuts > a > span { width: 28px; flex: 0 0 28px; color: #087b6b; }
  .mobile-shortcuts > a > .icon { width: 12px; height: 12px; margin-left: auto; color: #8aa0ab; }
  .mobile-shortcuts strong { display: block; font-size: 12px; margin-bottom: 5px; }
  .mobile-shortcuts small { display: block; font-size: 9px; color: #6c8290; line-height: 1.4; }
  .welcome-banner { padding: 20px; border-radius: 17px; gap: 16px; margin-bottom: 22px; }
  .welcome-banner h2 { font-size: 21px; }
  .welcome-banner p { font-size: 12px; line-height: 1.7; }
  .task-row { padding: 17px; gap: 10px; align-items: flex-start; flex-wrap: wrap; }
  .task-row > .grow { min-width: 0; flex: 1 1 calc(100% - 54px); padding-top: 3px; }
  .task-row h3 { font-size: 14px; line-height: 1.45; }
  .task-row p { font-size: 11px; line-height: 1.6; }
  .task-check { width: 44px; height: 44px; flex: 0 0 44px; border-radius: 12px; }
  .task-row > .stack-sm { width: 100%; flex-direction: row; justify-content: space-between; align-items: center !important; padding-left: 54px; gap: 8px; }
  .task-date { font-size: 11px; }
  .list-row { padding: 17px; min-height: 78px; gap: 12px; }
  .list-row strong { font-size: 14px; line-height: 1.4; }
  .list-row p { font-size: 11px; line-height: 1.5; }
  .pipeline-row { grid-template-columns: 90px 1fr 28px; font-size: 11px; gap: 10px; }

  /* Preserve selection inputs and handlers while presenting records as cards. */
  .mobile-record-table-wrap { overflow: visible; }
  .mobile-record-table, .mobile-record-table thead, .mobile-record-table tbody { display: block; width: 100%; min-width: 0; }
  .mobile-record-table thead tr { display: block; border-bottom: 1px solid #dce7e9; }
  .mobile-record-table thead th { display: none; }
  .mobile-record-table thead th[data-mobile-column="select"] { display: block; width: 100% !important; padding: 9px 17px; }
  .mobile-page-selection { display: flex; align-items: center; gap: 12px; min-height: 36px; font-size: 12px; color: #506977; cursor: pointer; }
  .mobile-page-selection > span { display: inline; }
  .mobile-record-table tbody { padding: 0 16px; }
  .mobile-record-table tbody tr {
    position: relative; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 16px; padding: 21px 0; border-bottom: 1px solid #e0e9eb;
  }
  .mobile-record-table tbody tr:last-child { border-bottom: 0; }
  .mobile-record-table tbody tr:hover { background: transparent; }
  .mobile-record-table td { display: block; padding: 0; border: 0; min-width: 0; font-size: 13px; }
  .mobile-record-table td[data-mobile-label]::before { content: attr(data-mobile-label); display: block; font-size: 9px; line-height: 1.3; font-weight: 650; color: #738994; letter-spacing: .7px; text-transform: uppercase; margin-bottom: 6px; }
  .mobile-record-table td[data-mobile-column="select"] { position: absolute; top: 14px; right: -6px; display: flex; justify-content: center; align-items: center; width: 44px; height: 44px; }
  .mobile-record-table td[data-mobile-column="identity"] { order: 0; grid-column: 1 / -1; }
  .mobile-selectable-record td[data-mobile-column="identity"] { padding-right: 38px; }
  .mobile-record-table .table-name { display: block; font-size: 19px; line-height: 1.3; margin-bottom: 5px; letter-spacing: -.35px; }
  .mobile-record-table .table-sub { font-size: 11px; line-height: 1.65; margin-top: 4px; white-space: normal; overflow-wrap: anywhere; }
  .mobile-record-table .small { font-size: 13px; line-height: 1.55; }
  .mobile-record-table td[data-mobile-column="contact"] { order: 1; grid-column: 1 / -1; }
  .mobile-record-table td[data-mobile-column="location"] { order: 2; grid-column: 1 / -1; }
  .mobile-record-table td[data-mobile-column="stage"] { order: 3; }
  .mobile-record-table:not(.mobile-record-manager) td[data-mobile-column="stage"] { grid-column: 1 / -1; }
  .mobile-record-table td[data-mobile-column="owner"] { order: 4; }
  .mobile-record-table td[data-mobile-column="month"] { order: 5; }
  .mobile-record-table td[data-mobile-column="year"] { order: 6; }
  .mobile-record-table td[data-mobile-column="actions"] { order: 7; grid-column: 1 / -1; margin-top: 2px; }
  .mobile-record-table .table-actions { justify-content: flex-start; gap: 9px; }
  .mobile-record-table .table-actions > a.btn { width: 100%; justify-content: space-between; background: #f1f8f6; color: #076e60; border-color: #d4e9e2; }
  .pagination { padding: 17px; flex-wrap: wrap; gap: 13px; font-size: 11px; }
  .pagination > .row { width: 100%; justify-content: space-between; gap: 10px; }
  .pagination .btn { flex: 1; justify-content: center; }
  .records-selection-scope .row, .archive-scope .row { align-items: stretch; gap: 14px; }
  .records-selection-scope .btn, .archive-scope .btn { width: 100%; justify-content: center; }
  .records-bulk-bar { position: static; padding: 15px; border-radius: 14px; gap: 14px; }

  /* Record work stays one tap away without changing permission checks. */
  .record-head { align-items: flex-start; gap: 13px; }
  .record-head > .avatar { width: 48px; height: 48px; flex: 0 0 48px; font-size: 16px; border-radius: 15px; }
  .record-head > div { min-width: 0; }
  .record-head h1 { font-size: 25px; letter-spacing: -.6px; }
  .record-meta { font-size: 11px; line-height: 1.55; gap: 8px 12px; }
  .record-meta > span { overflow-wrap: anywhere; }
  .mobile-record-actions { display: flex; gap: 8px; margin-bottom: 20px; }
  .mobile-record-actions > a, .mobile-record-actions > button {
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
    flex: 1 1 0; min-width: 0; min-height: 71px; padding: 11px 5px;
    background: #fff; color: #176b62; border: 1px solid #d5e7e1; border-radius: 14px; font-family: inherit;
  }
  .mobile-record-actions span { font-size: 10px; font-weight: 700; }
  .mobile-record-actions .icon { width: 20px; height: 20px; }
  .tabs { gap: 8px; margin: 0 -16px 18px; padding: 0 16px 10px; border: 0; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { min-height: 44px; padding: 10px 14px; flex-shrink: 0; border: 1px solid #dce6e8; border-radius: 11px; font-size: 12px; background: #fff; }
  .tab.active { color: #fff; background: #12374a; border-color: #12374a; box-shadow: none; }
  .tab.active:after { display: none; }
  .definition-grid { gap: 17px 13px; }
  .definition-grid dt { font-size: 10px; line-height: 1.5; }
  .definition-grid dd { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
  .quick-contact { gap: 8px; }
  .quick-contact > .btn { flex: 1 1 auto; justify-content: center; }
  .timeline { padding: 17px; }
  .timeline-entry p { font-size: 13px; line-height: 1.75; }
  .timeline-entry-header { gap: 8px; flex-wrap: wrap; }
  .danger-zone .row { flex-wrap: wrap; gap: 16px; }

  /* County/ZIP exploration retains the aggregate-only marketplace response. */
  .marketplace-shell .map-wrap { height: clamp(340px, 55dvh, 520px); }
  body[data-mobile-route="inventory"] .page-head { flex-direction: row; align-items: center; gap: 12px; margin-bottom: 18px; }
  body[data-mobile-route="inventory"] .page-head > div:first-child { flex: 1; min-width: 0; }
  body[data-mobile-route="inventory"] .page-head h1 { font-size: 24px; }
  body[data-mobile-route="inventory"] .page-head .eyebrow,
  body[data-mobile-route="inventory"] .page-head .tagline { display: none; }
  body[data-mobile-route="inventory"] .head-actions { width: 44px; flex: 0 0 44px; }
  body[data-mobile-route="inventory"] .head-actions [data-refresh] { width: 44px; height: 44px; padding: 0; font-size: 0; gap: 0; }
  body[data-mobile-route="inventory"] .head-actions [data-refresh] .icon { width: 19px; height: 19px; }
  .marketplace-map-card { isolation: isolate; }
  .marketplace-toolbar { align-items: stretch; gap: 12px; margin-bottom: 16px; }
  .marketplace-toolbar .segmented { display: flex; width: 100%; padding: 4px; border-radius: 13px; }
  .marketplace-toolbar .segmented button { flex: 1; min-height: 44px; font-size: 12px; border-radius: 10px; }
  .marketplace-toolbar [data-filter-description] { font-size: 11px; line-height: 1.6; }
  .map-summary { padding: 16px; gap: 10px; }
  .map-summary strong { font-size: 22px; }
  .map-summary strong > span { font-size: 11px; }
  .map-summary small { font-size: 11px; margin-top: 5px; }
  .map-foot { font-size: 10px; line-height: 1.7; padding: 14px 16px; }
  .leaflet-touch .leaflet-bar a { width: 42px; height: 42px; line-height: 42px; }
  .leaflet-touch .leaflet-bar a:first-child { border-radius: 9px 9px 0 0; }
  .leaflet-touch .leaflet-bar a:last-child { border-radius: 0 0 9px 9px; }
  .leaflet-touch .leaflet-bar { border: 1px solid #d4e1e5; border-radius: 10px; box-shadow: 0 3px 12px #163a4821; }
  .marketplace-area-sidebar { align-items: stretch; gap: 16px; }
  .map-selection-card { scroll-margin-top: calc(var(--mobile-topbar-height) + env(safe-area-inset-top) + 12px); scroll-margin-bottom: calc(var(--mobile-nav-height) + env(safe-area-inset-bottom) + 12px); }
  .map-selected-head { padding: 20px; }
  .map-selected-head h2 { font-size: 24px; }
  .map-selected-head p { font-size: 12px; }
  .map-selected-body { padding: 18px 20px 20px; }
  .map-selected-count strong { font-size: 34px; }
  .map-selected-count span { font-size: 12px; }
  .map-explore-actions { gap: 8px; }
  .map-explore-actions > .btn { flex: 1; justify-content: center; }
  .map-request-button { min-height: 49px; font-size: 14px; }
  .map-request-note { font-size: 11px; line-height: 1.65; }
  .area-heading { padding: 18px; font-size: 13px; }
  .area-list { max-height: 390px; overscroll-behavior: contain; }
  .area-item { min-height: 76px; padding: 16px 18px; }
  .area-item strong { font-size: 14px; }
  .area-item small { font-size: 11px; line-height: 1.65; }
  .area-count { font-size: 15px; }
  .claim-progress-card { border-radius: 15px; padding: 17px; }
  .claim-progress-heading { align-items: flex-start; gap: 12px; }
  .claim-progress-heading h3 { font-size: 14px; }
  .claim-progress-heading p, .claim-progress-card > p { font-size: 11px; line-height: 1.7; }

  /* Forms use the available visual viewport above the onscreen keyboard. */
  .dialog-backdrop {
    inset: auto 0 auto; top: var(--mobile-viewport-top, 0px);
    height: var(--mobile-visible-height, 100dvh);
    padding: 0; align-items: flex-end; z-index: 1800;
    background: #102c436b; backdrop-filter: blur(6px);
  }
  .dialog {
    width: 100% !important; max-width: 100% !important;
    max-height: 100%; height: 100%; border-radius: 0; border: 0;
  }
  .dialog-head { padding: calc(18px + env(safe-area-inset-top)) 18px 17px; gap: 14px; flex-shrink: 0; border-bottom: 1px solid #e0e8eb; }
  .dialog-head h2 { font-size: 22px; line-height: 1.3; }
  .dialog-head p { font-size: 12px; line-height: 1.6; }
  .dialog-body { flex: 1; max-height: none; padding: 20px 18px; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
  .dialog-foot { padding: 15px 18px calc(15px + env(safe-area-inset-bottom)); border-radius: 0; gap: 10px; }
  .dialog-foot > .btn { flex: 1; justify-content: center; min-height: 48px; }
  .dialog.small, .dialog.mobile-more-dialog { height: auto; max-height: calc(100% - 18px); border-radius: 24px 24px 0 0; }
  .dialog.small .dialog-head, .mobile-more-dialog .dialog-head { padding-top: 22px; }
  .mobile-more-dialog .dialog-body { padding: 4px 18px 10px; }
  .mobile-more-dialog .dialog-foot { display: none; }
  .mobile-more-groups section { padding: 17px 0 12px; border-bottom: 1px solid #e2e9ec; }
  .mobile-more-groups h3 { margin: 0 10px 8px; font-size: 10px; color: #708591; letter-spacing: 1.4px; text-transform: uppercase; }
  .mobile-more-groups nav { display: grid; gap: 2px; }
  .mobile-more-groups nav > a, .mobile-more-groups nav > button { display: flex; align-items: center; gap: 13px; width: 100%; min-height: 49px; padding: 12px 10px; background: none; border: 0; border-radius: 11px; color: #254557; font: inherit; text-align: left; }
  .mobile-more-groups nav > [aria-current="page"] { background: #e8f5ef; color: #08705f; }
  .mobile-more-groups nav > a > span, .mobile-more-groups nav > button > span { flex: 1; font-size: 14px; font-weight: 600; }
  .mobile-more-groups .icon { width: 20px; height: 20px; flex-shrink: 0; }
  .mobile-more-groups .icon:last-child { width: 15px; height: 15px; color: #97aab3; }
  .mobile-more-footer { padding: 15px 0 calc(17px + env(safe-area-inset-bottom)); display: flex; align-items: center; justify-content: space-between; gap: 10px; }
  .mobile-more-footer > span { font-size: 10px; color: #79909b; }

  /* Keep all visual-editor elements, grid controls, and content dialogs usable. */
  .campaign-nav { overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .campaign-nav a { min-height: 44px; flex-shrink: 0; font-size: 12px; }
  .campaign-builder-compose > .card-pad { padding: 14px; }
  .ce-mode-tabs button, .ce-main-actions button, .ce-panel-toggles button, .ce-device-tools button,
  .ce-content-tools button, .ce-content-link-tools button, .ce-side-tabs button { min-height: 42px; }
  .ce-workspace, .ce-hide-left .ce-workspace, .ce-hide-right .ce-workspace,
  .ce-expanded .ce-workspace, .ce-expanded.ce-hide-left .ce-workspace, .ce-expanded.ce-hide-right .ce-workspace { display: block; grid-template-columns: none; height: 670px; min-height: 400px; }
  .ce-canvas-area { height: 100%; width: 100%; }
  .ce-left { position: absolute; top: 0; bottom: 0; left: 0; z-index: 8; width: min(260px, calc(100% - 32px)); box-shadow: 8px 0 20px #173a431d; }
  .ce-right { position: absolute; top: 0; bottom: 0; right: 0; z-index: 8; width: min(300px, calc(100% - 32px)); box-shadow: -8px 0 20px #173a431d; }
  .ce-hide-left .ce-left, .ce-hide-right .ce-right { display: none; }
  .ce-expanded { top: var(--mobile-viewport-top, 0px); bottom: auto; height: var(--mobile-visible-height, 100dvh); padding: calc(8px + env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom)); }
  .ce-expanded .ce-main-actions button { min-height: 42px; padding: 8px; }
  .ce-expanded .ce-workspace { height: 100%; min-height: 300px; }
  .ce-expanded .ce-message-fields { max-height: 170px; }
  .ce-editor-open .dialog-backdrop { z-index: 2200; }
  .ce-preview-dialog .dialog-body, .ce-library-dialog .dialog-body, .ce-content-edit-dialog .dialog-body { max-height: none; padding: 16px; }
  .ce-content-editable { min-height: 180px; max-height: 45dvh; }
  .ce-content-link-tools input { font-size: 16px; min-height: 46px; }
  .campaign-audience-filters .campaign-field { min-width: 0; }

  /* Sign-in uses the same comfortable type and touch scale. */
  .auth-card { max-width: 480px; padding: calc(40px + env(safe-area-inset-top)) 25px calc(30px + env(safe-area-inset-bottom)); }
  .auth-brand { margin-bottom: 30px; }
  .auth-brand img { width: 58px; height: 58px; border-radius: 16px; }
  .auth-brand img.auth-full-logo { width: 300px; height: auto; }
  .auth-brand h1 { font-size: 27px; }
  .auth-intro { font-size: 14px; line-height: 1.8; }
  .auth-card form { gap: 20px; }
  .auth-card form label { font-size: 13px; }
  .auth-card form input { min-height: 51px; border-radius: 12px; }
  .auth-card .btn-primary { min-height: 51px; border-radius: 12px; font-size: 15px; }
}

@media (max-width: 374px) {
  .page { padding-left: 12px; padding-right: 12px; }
  .mobile-shortcuts { grid-template-columns: 1fr; }
  .mobile-shortcuts > a { min-height: 64px; }
  .mobile-record-table tbody { padding: 0 13px; }
  .topbar { padding-left: 12px; padding-right: 12px; }
  .head-actions > .btn { flex-basis: 100%; }
}
@media (min-width: 761px) and (max-width: 1100px) and (min-height: 501px) {
  .field input, .field select, .field textarea { min-height: 42px; }
  .icon-btn { min-width: 38px; min-height: 38px; }
}
@media print {
  #mobile-nav, .mobile-app-mark, .mobile-shortcuts, .mobile-record-actions, .mobile-filter-heading, .mobile-search-submit, .mobile-connection { display: none !important; }
  body.has-mobile-shell { padding-bottom: 0; }
}
