@media (max-width: 640px) {
  main { padding: 104px 10px 20px; }
  .topbar { gap: 10px; padding: 7px 12px 7px 22px; }
  .brand-full { display: none; }
  .brand-short { display: inline; }

  #btn-add { width: 40px; padding: 0; }
  #btn-add span { display: none; }

  .row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    grid-template-areas:
      "avatar name   more"
      "avatar status more"
      "sub    sub    sub"
      "cta    cta    cta";
    gap: 3px 12px;
    padding: 14px;
  }
  .avatar { grid-area: avatar; width: 44px; height: 44px; }
  .row-main { display: contents; }
  .row-top { display: contents; }
  .row-name {
    grid-area: name;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    align-self: end;
  }
  .row-status {
    grid-area: status;
    align-self: start;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .row-sub { grid-area: sub; margin-top: 6px; row-gap: 6px; }
  .row-sub .drop-name {
    flex: 1;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .row-sub .muted { white-space: nowrap; }
  .row-sub .bar { flex: 1 1 100%; order: 3; }
  .row-actions { display: contents; }
  .row-actions .pill { grid-area: cta; justify-content: center; padding: 10px 14px; }
  .row-actions .pill.icon {
    grid-area: more;
    width: 30px;
    height: 30px;
    justify-self: end;
  }
  .panel { border-radius: 20px; }
  .drawer-filters { gap: 6px; }

  /* campaign drawer becomes an iOS bottom sheet */
  #drawer {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 86vh;
    height: 86dvh;
    border: 0;
    border-top: 1px solid var(--separator);
    border-radius: 20px 20px 0 0;
    transform: translateY(105%);
  }
  #drawer.open { transform: translateY(0); }
  #drawer.dragging { transition: none; }
  .grabber {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: none;
    width: 100%;
    height: 28px;
    margin: 0;
    cursor: grab;
    touch-action: none;
  }
  .grabber::after {
    content: "";
    display: block;
    width: 40px;
    height: 5px;
    border-radius: 999px;
    background: var(--fill-strong);
  }
  .drawer-head {
    padding: 0 16px 8px;
    touch-action: none;
    cursor: grab;
  }
  .drawer-foot { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
}
